Manuscript Offprint
arXiv:2611.07526Understanding Data Influence in Transportation Networks: A Physics-Constrained Influence-Function Framework
Submitted to Transportation Science manuscript (Please, provide the manuscript number!)
Authors are encouraged to submit new papers to INFORMS journals by means of a style file template, which includes the journal title. However, use of a template does not certify that the paper has been accepted for publication in the named journal. INFORMS journal templates are for the exclusive purpose of submitting to an INFORMS journal and should not be used to distribute the papers in print or online or to submit the papers to another publication.
Understanding Data Influence in Transportation Networks: A Physics-Constrained Influence-Function Framework
Hamidreza Attari
Department of Civil and Environmental Engineering, University of California, Davis, CA, USA, hattari@ucdavis.edu
Yueyue Fan
Department of Civil and Environmental Engineering, University of California, Davis, CA, USA, yyfan@ucdavis.edu
Corresponding author
Johannes O. Royset
Daniel J. Epstein Dept. of Industrial and Systems Engineering, University of Southern California, CA, USA, royset@usc.edu
Abstract: Understanding how individual training observations influence model predictions is important for developing reliable and interpretable data-driven transportation systems. Existing influence-function methods, however, are primarily formulated for unconstrained learning and do not explicitly account for physical constraints that couple different components of a transportation network. Under such constraints, perturbing a training observation can affect model parameters and predictions only through physically feasible directions, potentially changing how its influence propagates across the network. This paper develops a hard physics-informed influence-function framework for constrained learning, in which training-data influence is characterized within the physically feasible space defined by network constraints. The analytical results reveal how physical constraints alter the magnitude, direction, and spatial distribution of training-sample influence relative to conventional influence measures. Using traffic prediction under flow-conservation constraints as a case study, we show that influential observations identified by the proposed framework differ systematically from those identified by classical influence functions. Through orthogonal decomposition, we quantitatively characterize how much of a perturbation in the training data is propagated through
Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
2
the network via the flow-conservation constraints and how much is removed by the constraint projection. The proposed influence framework provides a physically consistent approach for evaluating training-data influence in constrained transportation learning problems, with potential applications to data diagnostics, sensor evaluation, and targeted data collection.
Keywords: Influence functions; Physics-constrained learning; Constraint projection; Transportation network flow conservation; Value of information
In the machine learning literature, Influence Functions (IFs), originating from robust statistics, have been adapted as a principled framework for quantifying the influence of training data. IFs provide a useful means of understanding model behavior by characterizing model sensitivity to perturbations in training data and identifying influential observations; such influence measures can further provide a basis for assessing the value of training information (Koh and Liang 2017). However, classical IF formulations primarily consider unconstrained learning, where observations influence model parameters through the empirical loss (Schioppa et al. 2022, Basu et al. 2021). This limits the direct applicability of classical IF methods to transportation network problems, where learning is often subject to physical constraints that capture the spatial and temporal interdependencies among network components. Such constraints fundamentally alter how model parameters respond to perturbations in training data, requiring influence analysis that explicitly accounts for the constrained learning process.
In this paper, we establish a new framework for evaluating data influence in transportation networks by approaching the problem as a physics-constrained sensitivity problem. While the proposed influence-function framework is motivated by the broader class of physics-constrained learning problems, network-level physical constraints are particularly fundamental to transportation systems. Many transportation problems are defined over networks in which observations and system states across different components are coupled through physical and operational constraints such as flow conservation, network connectivity, and capacity restrictions. We therefore use short-term transportation network flow prediction as a motivating use case for developing the proposed framework.
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
3
In this setting, flow-conservation constraints provide a concrete representation of network-level coupling among link flows, allowing us to demonstrate why such structural dependencies should be explicitly incorporated into influence-function analysis.
Physics-informed machine learning has received growing attention in both the broader AI community and transportation research, reflecting increasing recognition that incorporating physical knowledge and system structure into learning can improve model accuracy, robustness, and consistency with underlying system behavior. For example, in the transportation community, early efforts in short-term traffic prediction progressed from classical statistical and machine-learning methods to increasingly sophisticated deep learning architectures that capture temporal and spatial dependencies in traffic data (Williams and Hoel 2003, Ma et al. 2015, Fu et al. 2016). More recent graph-based approaches, such as the diffusion convolutional recurrent neural network (DCRNN) (Li et al. 2018) and the spatio-temporal graph convolutional network (STGCN) (Yu et al. 2018), incorporate road-network topology into the learning architecture, allowing dependencies among connected network components to be captured. However, representing network connectivity does not necessarily enforce the physical relationships governing flows over the network. Despite their strong predictive performance, these models generally do not explicitly impose network-level physical constraints, such as flow conservation, on model learning and prediction. Predictions that are physically implausible can misrepresent the actual system state, trigger ineffective or counterproductive downstream actions, and ultimately impair the performance and reliability of transportation networks.
At the methodological level, physics-informed and constrained learning approaches have increasingly shifted from soft constraint enforcement toward hard feasibility guarantees. Early approaches typically incorporated physical or domain knowledge through penalty terms in the training loss, including penalty weights or Lagrange multipliers, thereby encouraging—but not guaranteeing—constraint satisfaction (Dener et al. 2020, Márquez-Neila et al. 2017). More recent approaches seek to enforce constraints directly within neural networks through feasible-set parameterizations, differentiable projections, repair mechanisms, KKT-based formulations, or variable transformations (Min and Azizan 2025, Frerix et al. 2020, Huang et al. 2021, Wang et al. 2023a, Tordesillas et al. 2023, Konstantinov and Utkin 2023, Chen et al. 2024). Collectively, these developments demonstrate growing recognition that physical constraints should be explicitly accounted for in how AI models learn and generate predictions. Yet, while physical constraints have increasingly been incorporated into how models learn, their implications for how the influence of training data is measured remain largely unexplored.
Existing sensitivity analysis and interpretability methods, including perturbation-based approaches and IFs, have primarily been developed for unconstrained learning settings, where prediction sensitivity reflects how changes in input data propagate through the learned mapping from
Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
observations to outputs. However, when hard physical constraints are embedded into the learning architecture, the prediction response is no longer determined solely by learned data-driven relationships. Instead, it is shaped by the interaction between learned representations and the feasible space defined by physical constraints. As a result, perturbations in input data may influence predictions through both the learned model and the constraint-enforcing mechanism, creating new challenges for identifying the true sources of predictive information. Understanding which sensor observations contribute most to physically constrained predictions is critical for improving data quality management and guiding sensor maintenance, calibration, and investment decisions in transportation networks.
In summary, existing literature shows that spatiotemporal deep learning can deliver strong forecasting results. Hard constraints can ensure physical consistency by design. IFs can connect predictions to individual training observations. However, these three areas have not been linked. As shown in table 1, despite growing interest in IFs, limited attention has been given to integrating them with learning architectures that impose hard physical constraints, tracing training-data influence through constraint projection, or using the resulting influence scores to identify sensors that disproportionately affect predictions from physically constrained models.
To address those gaps, this paper introduces a hard physics-informed influence-function framework for learning under physical constraints. The proposed framework quantifies training-data influence within the physically feasible space through constraint projection, explicitly capturing how network-level physical constraints alter the magnitude, distribution, and value of information. We first develop a physics-informed spatiotemporal neural network for short-term traffic flow forecasting. The model combines data-driven learning with a Hard Constraint Projection layer. This layer projects raw neural network outputs onto a set defined by junction-level flow conservation. We then analyze how local perturbations in traffic observations affect the learned prediction. To do this, we create a hard physics-informed influence-function framework that improves on traditional influence analysis for constrained traffic learning. Unlike standard influence functions, which quantify training-data influence on the unconstrained model output, our framework evaluates influence on the physically feasible output obtained through constraint projection. As a result, the influence scores show how physical constraints change, reduce, or redistribute the impact of training samples across the network. Practically, finding these influence scores can help identify critical infrastructure in transportation networks.
In the rest of the paper, Section 2 explains our physics constrained influence analysis method, Section 3 describes the setup of numerical experiments in short-term traffic prediction context, Section 4 presents results, and Section 5 summarizes key conclusions and discusses possible future extensions.
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
5
Table 1 Related work organized by how physics is handled and how sensitivity is analyzed.
| Physics treatment | Sensitivity / data perturbation | ||
|---|---|---|---|
| No sensitivity consideration | Training behavior | Post-hoc attribution | |
| No constraint | Liu et al. (2026)Ma et al. (2015)Fu et al. (2016)Li et al. (2018)Yu et al. (2018)Guo et al. (2019)Wang and Wang (2022) | — | Koh and Liang (2017) |
| Soft constraint | Márquez-Neila et al. (2017)Dener et al. (2020) | Wang et al. (2022)De Ryck et al. (2024)Daw et al. (2023)Wang et al. (2023b)Lu et al. (2021)Jagtap et al. (2020) | Krasowski et al. (2026) |
| Hard constraint | Frerix et al. (2020)Huang et al. (2021)Wang et al. (2023a)Tordesillas et al. (2023)Konstantinov and Utkin (2023)Chen et al. (2024)Min and Azizan (2025) | — | This work |
2. Methodology
2.1. A Hard-Constrained Neural Network Formulation
Consider a hard-constrained neural network architecture, in which an unconstrained neural-network prediction is passed through a differentiable enforcement layer before being used as the final model output. Let denote the input space and let be a neural network parameterized by , where is the input dimension and is the output dimension. For an input , the raw neural-network prediction is denoted by . In the hard-constrained setting, this raw prediction is not directly used as the final output because it may violate known constraints. Instead, the final prediction is obtained by applying a projection operator to the raw output, yielding
where represents the hard-constrained prediction. The goal is to create an enforcement mapping that meets the specified constraints for every . Although the projection does not need to be globally smooth, being differentiable almost everywhere allows gradients to propagate through the projection layer, thereby enabling end-to-end gradient-based training (Min and Azizan 2025). By construction, this hard-constrained model ensures that final output satisfies the constraints, unlike many physics-informed learning models that impose constraints softly through adding a penalty term to the training loss.
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
We consider the HardNet-Aff formulation for enforcing input-dependent affine constraints (Min and Azizan 2025). Specifically, suppose the admissible output must satisfy
where is the constraint matrix, are the lower and upper constraint limits, and is the number of affine constraint rows. In transportation networks, this class of constraints includes, for example, flow-conservation constraints at a node ,
where and denote the sets of incoming and outgoing links, respectively, and represents the net flow supply or demand at node . Such an equality can be represented in the two-sided inequality form by setting the corresponding lower and upper bounds equal, . Similarly, a link-capacity constraint for link can be written as . Where denotes the available capacity of link . Thus, both network flow-conservation and capacity constraints can be represented within the general affine constraint form considered here. Inequalities are understood component-wise. The feasible set associated with input is therefore:
The HardNet-Aff projection maps the raw neural-network output to a feasible point in through the closed-form correction
where is applied component-wise and
is the right pseudoinverse of . This expression assumes that has full row rank for each , so that is invertible, and that is nonempty for every input.
A useful special case arises when the constraints are equalities of the form
Unlike (5), whose ReLU-based correction introduces non-differentiability, the following equality projection in (8) is affine in for fixed and therefore here smoothness is preserved. In this case, (5) simplifies to
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
7

Figure 1 Schematic illustration of the HardNet-Aff framework, adapted from Min and Azizan Min and Azizan (2025). A standard neural network first maps the input to an unconstrained prediction . The prediction is then passed through a differentiable constraint-enforcement layer, where the affine constraint set is defined for the given input and the projection operator maps the raw output to a feasible point. The final projected output satisfies by construction, while gradients can still be backpropagated through the projection layer during end-to-end training.
and under the full-row-rank assumption, , so that the projected output satisfies exactly for every . Even though this study does not deal with general nonlinear constraints, our formulation does extend the enforcement of hard constraints to cases involving input-dependent affine constraints with exact feasibility. Figure 1 explains how the projection will be applied in our framework.
2.2. Hard Physics-Informed Influence Functions
Influence functions are used to quantify how each training sample affects the learned model and its physically feasible predictions. Let be the training dataset, where and . Since the final model output is , the sample-wise hard physics-informed loss is defined as
where is the prediction loss function. The empirical hard-constrained risk and the trained parameters are
To measure the contribution of training sample , we consider an infinitesimal upweighting of its loss term and define the perturbed objective as
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
Henceforth, we assume that the relevant local minimizer is unique in a neighborhood of , and denote the corresponding perturbed solution by . The parameter-level influence is the first-order change , approximated by
where is the Hessian of the empirical hard-constrained risk evaluated at . This first-order approximation relies on the standard assumptions of the influence function that is twice continuously differentiable in a neighborhood of , is non-singular, and the perturbation is infinitesimal; see, e.g., Royset and Wets (2021) for general subdifferential calculus rules.
For a test sample , the hard physics-informed influence of training sample on the test loss at is
Defining and , this becomes . A positive value indicates that upweighting increases the hard-constrained test loss at ; a negative value indicates it decreases it.
The main distinction from the classical influence function (Koh and Liang 2017) is that all derivatives are computed through the hard-constrained prediction map. By the chain rule,
so the Jacobian includes the impact of the projection layer in all calculations of influence. Consequently, measures the sensitivity of the physically feasible prediction, not the unconstrained neural-network output.
More generally, the same framework evaluates the influence of a training sample on any differentiable scalar quantity derived from the hard-constrained prediction:
For a group of training samples , the group influence on is
This group formulation supports sensitivity analysis over subsets of the training data such as spatial regions, time periods, operating conditions, or physical regimes.
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
9
2.3. Null-Space Decomposition and the Physical Influence Purity Indicator
For the equality constraints in (7), the projection in (8) specializes to
Assuming that has full row rank, where is the number of monitored links and the number of conservation equations, its right pseudoinverse is . The corresponding projection Jacobian, obtained from (14), is
Here, is the orthogonal projector onto null(), representing directions that do not affect the satisfaction of conservation constraints. Meanwhile, projects onto the constraint-related directions. This represents the component that is adjusted to enforce conservation constraints. The projector is symmetric, idempotent, and depends only on the constraint matrix ; once the traffic network and conservation constraints are specified, remains fixed during training.
Substituting Equation (18) into Equation (14), the gradient of the hard-constrained loss with respect to the raw prediction is
where and is the gradient of the prediction loss with respect to the hard-constrained output at training sample . Since is an orthogonal projector, any admits the unique orthogonal decomposition
where is the conservation-consistent component and is the conservation-violating component. This interpretation follows directly from the geometry of the feasible set. If is feasible to satisfy , for any we have for all . Thus, moving in a null-space direction does not affect conservation. For a nonzero , we can write . Since has full row rank, is nonsingular, and therefore . Hence, for , moving in this direction changes the constraint residual. The decomposition in (20) therefore separates the gradient into directions that are compatible with the conservation constraints and directions that are removed by the projection. The orthogonality of these two components yields
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
Equation (19) shows that only contributes to the gradient with respect to the raw prediction. The component is in the row space of and is eliminated by the projection Jacobian . Therefore, under the projected loss, this component does not propagate to the model parameters through the hard-constrained prediction map.
The decomposition also shows how much of a sample gradient is retained after the constraint projection. To compare this effect across samples, the measure should reflect the gradient's alignment with null() rather than its magnitude; otherwise, samples with larger residuals would dominate the comparison. A common range is also useful when comparing different time periods or network locations. Since acts on all output components at once, the measure should be based on the full gradient vector.
The orthogonal decomposition in (21) gives this quantity directly. So the retained component can be normalized by the total gradient norm. The resulting ratio is independent of gradient magnitude, lies in , and measures the share of the squared gradient norm that is aligned with conservation-consistent directions.
Definition 1 (Physical Influence Purity) The Physical Influence Purity (PIP) of training sample is defined as
where is a small constant used to avoid division by zero. When , .
PIP is bounded in directly from the orthogonal decomposition in (21). In particular, both and are non-negative. Therefore, cannot exceed , and the ratio in (22) lies between zero and one. Squared norms are used because (21) gives an additive decomposition of the squared gradient magnitude. Thus, PIP represents the fraction of the total squared gradient magnitude that remains in conservation-consistent directions after projection.
A value close to means that the loss-gradient direction is nearly aligned with null(). Thus, the change indicated by the gradient is largely compatible with the conservation constraints. In contrast, a value close to means that the gradient lies mainly in row(). This component is removed when the gradient is multiplied by the projection matrix and therefore does not contribute to updates through the prediction.
2.4. Practical Computation of Influence Functions
The influence score in Equation (13) requires computing , where is the Hessian of the hard-constrained empirical loss. With a high number of trainable parameters, forming is computationally infeasible, and direct inversion costs operations. The key observation is that we never need as an explicit matrix. For a fixed test window , every
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
11
influence score reduces to a dot product once the inverse Hessian-vector product (iHVP)
is available. The computational task therefore reduces to solving the linear system without ever forming .
The iterative solver we adopt requires only Hessian-vector products (HVPs), that is, products of the form for arbitrary . By the Pearlmutter identity (Pearlmutter 1994), this product is equal to a gradient:
The right-hand side is the gradient of the scalar with respect to . This costs time and memory with no need to store . A significant structural outcome is that every Hessian-vector product is automatically physics-informed. By the chain rule, the gradient of the hard-constrained loss satisfies:
so the conservation projection acts on every gradient before it enters the HVP. Differentiating (25) again, the Hessian separates into a Gauss-Newton term of the form . Here, , and there is also a term that involves the second derivative of the network output that is weighted by . In the Gauss-Newton term, any change in parameters that would push the raw prediction in a direction that violates conservation is canceled by and therefore does not contribute to the curvature term.
To approximate iteratively, we rely on the Neumann series identity. For any step size satisfying , the inverse admits the convergent series:
which holds because all eigenvalues of are strictly inside the unit circle under the stated condition on . Multiplying both sides of (26) by and identifying the partial sums with an iterative update leads to the LiSSA recursion (Agarwal et al. 2017):
where exactly as . Each step requires exactly one HVP evaluation.
For our model, however, the naïve recursion (27) converges very slowly in practice. A large spectral radius , restricts the admissible step size , while near-zero Hessian eigenvalues lead to poor
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
conditioning. The solution for this problem is to normalize by its spectral radius before applying the Neumann series. Define the scaled and damped Hessian:
where is a small damping constant. Dividing by maps all eigenvalues of into , so has eigenvalues in and is positive definite. The Neumann series for then converges with the step size , which yields the update rule:
If denotes the -th eigenvalue of , the corresponding eigenvalue of the iteration matrix is:
where we assume , so that and hence . The spectral radius of the iteration matrix is therefore:
Theorem 1 (Convergence of Scaled LiSSA) Let denote the unique solution to the scaled linear system . Starting from , the iterate produced by (29) satisfies:
The rate depends only on and , not on or .
Proof. Step 1: Identify the fixed point. The update rule (29) is a linear map in . A fixed point satisfies , so substituting into (29):
Collecting all terms involving on the left:
Simplifying the left side:
Factoring out and recognizing the definition (28):
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
13
Since is positive definite it is invertible, and the unique fixed point is:
Step 2: Derive the error recursion. The update rule (29) can be written compactly as:
The fixed point equation (36) equivalently reads:
Define the error . Subtracting (39) from (38):
Step 3: Apply the recursion times. Equation (40) shows that the error is multiplied by at every step. Applying it repeatedly:
Step 4: Bound the norm. Since is symmetric and is symmetric, the iteration matrix is symmetric, hence normal, so its spectral norm equals its spectral radius: . Taking the Euclidean norm of both sides of (41) and applying this fact together with :
Substituting (31):
It is worth being precise about what the scaled LiSSA computes relative to the exact iHVP. From equation (36), the fixed point solves . Substituting the definition (28) and multiplying both sides by :
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
where is the effective regularization. Solving for gives . Substituting into the influence score:
This is the regularized influence function, which replaces the exact with . Convergence is true for any according to Theorem 1. The regularization reflects the cost of a contraction rate that does not depend on the conditioning of . This regularization can be made tiny, but this will require more iterations. Since is a global constant shared across all pairs , it cancels upon normalization and does not affect the relative ranking of training samples.
2.5. Station Sensitivity Score
The influence score ranks training samples. To measure how sensitive the forecast at each detector station is, we define a score for each station that uses the from (23). For a test window with input , let
be the unit direction of the iHVP, and let be the physics-feasible forecast at station . The Station Sensitivity Score (SSS) of station is
where is the set of test windows. The term inside the absolute value is the rate of change of the forecast at station when the parameters move along . A large means that the forecast at station responds strongly to the parameter changes that matter most for the test windows. For comparison across stations, the scores are scaled.
3. Numerical Experiments
3.1. Traffic Flow Prediction Problem Setup
We formulate traffic flow forecasting on a directed traffic network , where is the set of junctions and is the set of monitored directed links. At time , the feature vector of link is , where , , and denote flow, speed, and occupancy, respectively. Stacking all link-level features gives the network traffic-state matrix .
To capture temporal dependence, we use a rolling time window of length . The input sample at time is , and the prediction target is the next-hour flow vector . The raw neural-network prediction is ,
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
15
where is a spatiotemporal forecasting model, and the final prediction is the hard-constrained output .
The physical constraint considered in this work is junction-level flow conservation. Let denote the set of junctions where conservation is imposed. For each , let and be the sets of incoming and outgoing monitored links. The predicted flows are required to satisfy
where is the net imbalance at junction . For example, if the time window is sufficient to clear the traffic, could be zero. Stacking over all constrained junctions gives the equality constraint
where is the junction-link conservation matrix with entries
and is the vector of net junction imbalances. Using the HardNet-Aff projection from Section 2.1, the final forecast satisfies for every input window .
Given the training dataset , the model is trained by minimizing
where is the forecasting loss function.
3.2. Experimental Setup
We use hourly PeMS District 3 data covering 318 monitored freeway links across the Sacramento metropolitan network from January to May 2025, yielding hourly observations. A map of the study area is provided in the Results section (Figure 3). Each link carries three features - flow, speed, and occupancy - and the prediction target is the next-hour flow vector . Using a 24-hour input window, the dataset produces 3,599 input-target pairs, split chronologically into 70% training, 15% validation, and 15% test. Features are standardized using training-set statistics; targets are retained in original units (vehicles per hour).
We construct a node-link graph from corridor topology, generating 312 candidate junction flow conservation equations. Each equation is validated empirically: a constraint is retained only if its mean relative residual does not exceed 10% and its 95th-percentile relative residual does not exceed 30% of total involved flow, with all constituent links observed. Of the 312 candidates, 62 pass
Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
Author: Physics-constrained IF
both criteria and form the constraint matrix , which has full row rank. Every retained constraint relates exactly one consecutive station pair (+1 incoming, -1 outgoing). The constraint vector is estimated as the mean of over the training period, accounting for systematic junction imbalances due to residual unmonitored flows.
As shown in Figure 2, HardNetAff-STGNN consists of a backbone of the spatial-temporal graph neural network followed by a hard equality projection layer. With approximately trainable parameters, The backbone includes two graph convolutional layers with 64 hidden units, a single-layer LSTM with 128 hidden units, and a prediction head composed of a fully connected hidden layer with 64 units and a final linear output layer producing predictions for 318 stations. ReLU activation and dropout with a rate of 0.1 are used for nonlinearity and regularization. The raw station-level predictions are then passed through the hard affine equality projection layer to enforce traffic-flow conservation constraints exactly. The model is trained end to end with the Adam optimizer using a learning rate of , weight decay of , and a batch size of 32, with gradient clipping at a maximum norm of 5.0.

Figure 2 HardNetAff-STGNN architecture for traffic-flow prediction. The STGNN backbone learns spatial and temporal traffic patterns from loop detector data, while the hard equality projection layer enforces traffic-flow conservation to produce physics-feasible station-level predictions (figure generated in ChatGPT).
The spectral radius is estimated by stochastic power iteration. For the main iHVP computation we use damping , iterations, and independent chains, yielding a deterministic convergence error of per Theorem 1. The batch size is set to
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
17
, which reduces the stochastic noise floor by a factor of compared to the commonly used default of , bringing run-to-run agreement below the 8% threshold. Convergence of each iHVP estimate is verified by the run-agreement criterion:
where and are the two independent chains initialized from the same but with different random batch sequences. Table 2 summarizes all hyperparameters.
Table 2 Scaled LiSSA hyperparameters used in experiments.
| Parameter | Value | Justification |
|---|---|---|
| Damping | 0.05 | Convergence error (Theorem 1) |
| Iterations | 400 | Error bound |
| Runs | 3 | Variance reduction; agreement verifiedby (51) |
| Batch size | 256 | Noise floor ; reduction vs. ;agreement |
| Power steps | 40 | Stable estimate |
| Power batches | 12 | Accurate HVP per power step |
| Agreement thresh-old | 8% | Accounts for irreducible stochastic noise at |
All experiments were conducted in Google Colab using high-RAM runtime with a single NVIDIA T4 GPU.
4. Results
Table 3 shows test set performance of constrained and unconstrained models, measured by data alignment and constraint alignment. Data alignment is measured by
where and are the observed and predicted flow at link in test window , both in vehicles per hour on the original scale. The HardNetAff-STGNN and unconstrained model achieve a similar level of data alignment. The key difference is in the alignment with physical constraints. The unconstrained output breaks junction flow conservation by an average of 121.95 veh/hr, reaching as high as 536.143 veh/hr in some cases. This is equivalent to the hourly capacity of a full freeway lane. The hard-constrained output reduces this to veh/hr on average. This confirms near-exact enforcement of all 62 constraints at once throughout the test period.
The small accuracy gain shows a common feature of hard-constrained architectures. The projection ensures physical feasibility by design instead of improving the raw predictive signal. Therefore, accuracy gains are less important than meeting constraint satisfaction guarantees.
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
Table 3 Test set results on 318-link Sacramento PeMS network (540 test windows). Flow units: veh/hr.
| Model | Data alignment | Physical constraint alignment | |||
|---|---|---|---|---|---|
| MAE | RMSE | max | |||
| Unconstrained | 267.209 | 443.807 | 0.9147 | 121.95 | 536.143 |
| HardNetAff-STGNN | 263.659 | 439.798 | 0.9162 | ||
4.1. Physics-Informed Purity Analysis
Table 4 shows the PIP statistics for the HardNetAff-STGNN across the training sets. These values represent the fraction of loss-gradient energy that aligns with the conservation-consistent subspace null(). The HardNetAff-STGNN has a mean PIP of 0.923 on the training set. The close match between training and test PIP indicates that the model's gradient structure for conservation performs well with new observations. A mean PIP of 0.923 means that about 92.3% of the loss-gradient energy at the hard-constrained output is in the conservation-consistent subspace null(). The remaining 7.7% is in the conservation-violating direction row(), and the projection Jacobian removes it before it affects the model parameters.
Table 4 PIP statistics for the HardNetAff-STGNN.
| Training set | |
|---|---|
| Mean PIP | 0.923 |
| Median PIP | 0.931 |
| AM peak (07:00-09:00) | 0.948 |
| PM peak (16:00-18:00) | 0.938 |
| Night (22:00-05:00) | 0.891 |
PIP changes during different traffic periods. The AM peak period has the highest PIP at 0.938. The night period, from 22:00 to 05:00, shows the lowest PIP at 0.057 lower than the AM peak. During overnight hours, low and highly variable traffic flow leads to larger prediction errors. This makes the physical constraints more influential.
4.2. Station Sensitivity Score and Spatial Analysis
Figure 3 show how SSS values are spread across the 318 monitored freeway stations. The map highlights a clear star-shaped concentration around the downtown Sacramento interchange (lat ≈ 38.6°, lon ≈ −121.4°), where Interstates 80 and 5, US Highway 50, and State Route 99 meet. SSS declines steadily from this core along each corridor, dropping to nearly zero at outer stations more than about 50 km from the interchange. This pattern reflects the layout of the conservation
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
19
constraint matrix : stations near the most constrained junctions show the highest alignment with the network-level loss gradient . This finding indicates that the model's predictions for all 318 links depend most critically on the flows at these key nodes. The northeast arm, which corresponds to the inbound I-80 corridor from Roseville, remains elevated over the largest distance. This is consistent with this route carrying the highest inbound traffic volume and giving the most valuable gradient signal during training.

Figure 3 Spatial distribution of Station Sensitivity Scores (SSS) across the Sacramento PeMS network. Yellow indicates high sensitivity; dark blue indicates near-zero sensitivity. The star-shaped pattern centers on the downtown interchange where I-80, I-5, US-50, and CA-99 meet.
4.3. Impact of Physics Constraints on Influence Assessment
We compare three frameworks that differ in their models and influence methods. In the first framework, we apply the classic influence function to the unconstrained model, so no part of the analysis uses physics. In the second, we apply the classic influence function to the physics-informed model. The model is trained with our HardNet-Aff model, but the influence analysis ignores the projection layer and uses only the network's raw prediction. In the third, we apply our physics-informed influence function framework to the physics-informed model, so both the model and the influence analysis include the conservation constraints. Difference between the first and second frameworks shows the effect of considering physics in the model. Difference between the second and third shows the effect of considering physics in the influence analysis.
Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)

Figure 4 Top 30 stations by importance score under three frameworks: classic influence function on the unconstrained model (left), classic influence function on the physics-informed model (middle), and physics-informed influence function on the physics-informed model (right). Each box is a station at its rank, and each line follows the same station from one framework to the next. Colors show the freeway route. Thick flat lines mark stations with the same rank in both frameworks. Dashed lines mark stations that enter or leave the top 30; their rank outside the top 30 is shown at the bottom.
Figure 4 compares the top 30 most important stations based on the SSS score calculated under the three frameworks. Each column corresponds lists the top 30 stations in the order of importance under one framework. The lines flow between the columns show the varying order of importance
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
21
across different frameworks. The top two stations, 312010 on Route 50 and 314491 on Route 80, are consistently identified as the most important across all three methods. However, incorporating physics constraints into the model and influence analysis leads to different influence estimates, substantially altering the relative rankings of most sensors in the top 30.
4.4. Comparison with Traffic-based and Topological Importance Measures
We now examine whether the physics-informed influence score (SSS) provide new information beyond simpler importance measures such as traffic volume, node degree centrality, and betweenness centrality. The node degree is the number of road links that converge at a station. Betweenness centrality measures how frequently the station lies on shortest paths of demand; the higher the value, the more central the station is.
Figure 5 shows the top 30 stations under each measure. The two network-centrality measures point to very different stations compared with SSS. Betweenness selects a continuous stretch, where many shortest paths pass, but only 7 of these stations are in the SSS top 30. Several of them rank below 200 by SSS. Degree performs no better, with 8 shared stations. The 11 stations with degree 3 or 4 are all at freeway-to-freeway interchanges. Only two of them are in the SSS top 30, and the rest rank between 83 and 290. Degree cannot separate the remaining stations, since most of the stations have exactly two road links. Traffic volume is closer to SSS; 26 out of the 30 stations appear in the top 30 list from both methods. This is expected, because busier stations contribute more to network-wide prediction error. However, the ranking of the 40 sensors differ substantially. The two lists also differ at the top-ranked stations. Stations 318934 and 3002042 carry high volume (ranks 11 and 14), but SSS places them outside its top 30 (ranks 39 and 36). The differences suggest that physics-informed influence provides information that is not readily captured by conventional traffic-based or topological metrics.
4.5. Assessing the Learning Impact of Influential Sensors
To evaluate whether SSS accurately identifies stations that are important for model learning, we conduct a sensor holdout experiment using the unconstrained baseline model and HardNetAff-STGNN model. Two separate experiments were performed: withholding data from the ten highest-ranked stations and withholding data from the ten lowest-ranked stations during training. Each model was retrained under both conditions and evaluated across all 318 stations using MAE, RMSE, and . The Percentage changes were calculated relative to the corresponding full model trained using all stations.
In each trial, the input features for the removed stations are masked in the training set. The model is retrained from scratch and tested on all 318 stations using the full unmasked test set.
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)

(a) SSS (physics-informed influence)
(b) Traffic volume (26 of 30 shared with SSS)

(c) Degree (8 of 30 shared with SSS)
(d) Betweenness (7 of 30 shared with SSS)
Figure 5 Top 30 stations by (a) the physics-informed influence score (SSS), (b) mean hourly traffic volume, (c) degree, and (d) betweenness centrality. Red markers show the top 30 stations of each measure; blue rings mark stations that are also in the SSS top 30. The table beside each map lists the ranking and the SSS rank of each station.
As shown in table 5, Withholding the top-10 SSS stations substantially degrades both models. For the unconstrained model, MAE and RMSE increase by approximately 52.6% and 119%, respectively, while decreases by 33.2%. The physics-informed model shows increases of 44.2% in MAE and 114.19% in RMSE, together with a 32% reduction in . In contrast, withholding the bottom-10 stations increases MAE and RMSE by approximately 4% and 2.1% for the unconstrained model, while reducing these errors by 1.87% and 0.76% for the physics-informed model. The corresponding Changes in are near zero for both models. These results explain the usefulness of SSS for identifying stations whose data strongly influence the prediction accuracy. Although the physics-
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
23
informed model shows smaller relative increases in error following top-10 removal, both models remain sensitive to the loss of these stations.
Table 5 Impact of holding out the top-10 and bottom-10 SSS stations on the unconstrained and physics-informed models. All metrics are evaluated across all stations. (%) denotes the percentage change relative to the corresponding full model.
| Metric | Unconstrained | Physics-informed | ||||||
|---|---|---|---|---|---|---|---|---|
| Holdout value | (%) | Holdout value | (%) | |||||
| Top-10 | Bottom-10 | Top-10 | Bottom-10 | Top-10 | Bottom-10 | Top-10 | Bottom-10 | |
| MAE (veh/hr) | 383.99 | 263.84 | +52.6 | +4 | 389.83 | 265.23 | +44.2 | -1.87 |
| RMSE (veh/hr) | 945.92 | 439.26 | +119 | +2.1 | 947.53 | 438.90 | +114.19 | -0.76 |
| 0.613 | 0.917 | -33.2 | 0.6113 | 0.9166 | -32 | |||
The differences between the two removal experiments confirm that SSS is a valuable sensitivity indicator. The ten highest-SSS stations, focused on the downtown Sacramento interchange and along the inbound I-80 corridor, greatly enhance the model's ability to learn flow patterns across the network. Removing them cuts off the model's access to the most limited point in the network, making predictions in downstream areas unreliable. In contrast, the ten lowest-SSS stations are located at the edges and have little impact on the gradient directions learned by the model, so their removal hardly affects its quality.
5. Conclusions and Discussion
This paper presents a new framework for evaluating influence of data on transportation network problems subject to linear set of physical constraints like flow conservation. Through sensitivity analysis and orthogonal decomposition, we provide analytical insights how physical constraints alter the magnitude, direction, and spatial distribution of training-sample influence. Numerically, we demonstrate the difference between our influence result compared with classical methods, and how such difference translates to model prediction performance. Practically, Station Sensitivity Score (SSS) based on the influence calculation of each station data can further support downstream applications to data diagnostics, sensor evaluation, and targeted data collection.
For future research, despite the computational improvements achieved by the proposed framework, extending influence analysis to larger transportation networks remains challenging, particularly as the number of model parameters, monitoring stations, and physical constraints increases. An important direction for future research is to exploit the sparse and localized structure of traffic network interactions to further reduce the computational cost of influence estimation, rather than treating all model parameters and physical constraints as globally coupled. From a modeling perspective, future studies can relax the assumption of a fixed conservation structure by introducing time-changing
Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
24
constraints that respond to incidents, control actions, or changing demand patterns. More broadly, the proposed framework lays the groundwork for adaptive, physics-aware learning in transportation networks. By incorporating SSS into online sensing and model updating, future systems could continuously identify the most informative data sources and adapt sensing strategies in response to changing traffic conditions. This perspective may extend the proposed framework beyond static prediction toward closed-loop, self-improving transportation intelligence.
Acknowledgments
This work is supported by the National Science Foundation under grant CMMI-2432336/CMMI-2432337.
References
Naman Agarwal, Brian Bullins, and Elad Hazan. Second-order stochastic optimization for machine learning in linear time. Journal of Machine Learning Research, 18(116):1–40, 2017.
Samyadeep Basu, Phillip Pope, and Soheil Feizi. Influence functions in deep learning are fragile. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=xHKVVHGDOEk.
Hao Chen, Gonzalo E. Constante-Flores, and Can Li. Physics-informed neural networks with hard linear equality constraints. Computers & Chemical Engineering, 189:108764, 2024. doi: 10.1016/j.compchemeng.2024.108764.
Arka Daw, Jie Bu, Sifan Wang, Paris Perdikaris, and Anuj Karpatne. Mitigating propagation failures in physics-informed neural networks using retain-resample-release (R3) sampling. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 7264–7302. PMLR, 2023.
Tim De Ryck, Florent Bonnet, Siddhartha Mishra, and Emmanuel de Bézenac. An operator preconditioning perspective on training in physics-informed machine learning. In International Conference on Learning Representations, 2024.
Alp Dener, Marco Andres Miller, Randy Michael Churchill, Todd S. Munson, and Choong-Seock Chang. Training neural networks under physical constraints using a stochastic augmented lagrangian approach, 2020. URL https://arxiv.org/abs/2009.07330.
Thomas Frerix, Matthias Niessner, and Daniel Cremers. Homogeneous linear inequality constraints for neural network activations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 3229–3234. IEEE Computer Society, 2020. doi: 10.1109/CVPRW50498. 2020.00382.
Rui Fu, Zuo Zhang, and Li Li. Using LSTM and GRU neural network methods for traffic flow prediction. In 2016 31st Youth Academic Annual Conference of Chinese Association of Automation (YAC), pages 324–328, 2016. doi: 10.1109/YAC.2016.7804912.
Author: Physics-constrained IF Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
25
Shengnan Guo, Youfang Lin, Ning Feng, Chao Song, and Huaiyu Wan. Attention based spatial-temporal graph convolutional networks for traffic flow forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 922–929, 2019. doi: 10.1609/aaai.v33i01.3301922.
Dou Huang, Haoran Zhang, Xuan Song, and Ryosuke Shibasaki. Differentiable projection for constrained deep learning, 2021. URL https://arxiv.org/abs/2111.10785.
Ameya D. Jagtap, Kenji Kawaguchi, and George Em Karniadakis. Adaptive activation functions accelerate convergence in deep and physics-informed neural networks. Journal of Computational Physics, 404:109136, 2020. doi: 10.1016/j.jcp.2019.109136.
Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1885–1894. PMLR, 2017. URL https://proceedings.mlr.press/v70/koh17a.html.
Andrei V. Konstantinov and Lev V. Utkin. A new computationally simple approach for implementing neural networks with output hard constraints. Doklady Mathematics, 108(Suppl. 2):S233–S241, 2023. doi: 10.1134/S1064562423701077.
Aleksander Krasowski, Jonas R. Naujoks, Moritz Weckbecker, Galip Ü. Yolcu, Thomas Wiegand, Sebastian Lapuschkin, Wojciech Samek, and René P. Klausen. PINNfluence: Interpreting PINNs through influence functions. In Proceedings of the 43rd International Conference on Machine Learning. PMLR, 2026.
Yaguang Li, Rose Yu, Cyrus Shahabi, and Yan Liu. Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id=SJiHXGWAZ.
Xin Liu, Lanqi Qin, Meng Xu, Yicheng Zhou, Bo Wang, Weiren Yu, and Wenxin Xiong. A comprehensive review of traffic flow forecasting based on deep learning. Neurocomputing, 668:132269, 2026. doi: 10.1016/j.neucom.2025.132269.
Lu Lu, Xuhui Meng, Zhiping Mao, and George Em Karniadakis. DeepXDE: A deep learning library for solving differential equations. SIAM Review, 63(1):208–228, 2021. doi: 10.1137/19M1274067.
Xiaolei Ma, Zhimin Tao, Yinhai Wang, Haiyang Yu, and Yunpeng Wang. Long short-term memory neural network for traffic speed prediction using remote microwave sensor data. Transportation Research Part C: Emerging Technologies, 54:187–197, 2015. doi: 10.1016/j.trc.2015.03.014.
Pablo Márquez-Neila, Mathieu Salzmann, and Pascal Fua. Imposing hard constraints on deep networks: Promises and limitations. In CVPR Workshop on Negative Results in Computer Vision, 2017. URL https://arxiv.org/abs/1706.02025.
Youngjae Min and Navid Azizan. HardNet: Hard-constrained neural networks with universal approximation guarantees. In Neural Information Processing Systems (NeurIPS) Constrained Machine Learning Workshop, 2025. URL https://arxiv.org/abs/2410.10807.
Article submitted to Transportation Science; manuscript no. (Please, provide the manuscript number!)
26
Barak A. Pearlmutter. Fast exact multiplication by the hessian. Neural Computation, 6(1):147–160, 1994. doi: 10.1162/neco.1994.6.1.147.
Johannes O. Royset and Roger J-B Wets. An Optimization Primer. Springer Series in Operations Research and Financial Engineering. Springer, Cham, 2021. doi: 10.1007/978-3-030-76275-9.
Andrea Schioppa, Polina Zablotskaia, David Vilar, and Artem Sokolov. Scaling up influence functions. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 8179–8186, 2022. doi: 10.1609/aaai.v36i8.20791.
Jesus Tordesillas, Victor Klemm, Jonathan P. How, and Marco Hutter. RAYEN: Imposition of hard convex constraints on neural networks, 2023. URL https://arxiv.org/abs/2307.08336.
Bowen Wang and Jingsheng Wang. ST-MGAT: Spatio-temporal multi-head graph attention network for traffic prediction. Physica A: Statistical Mechanics and its Applications, 603:127762, 2022. doi: 10.1016/j.physa.2022.127762.
Runzhong Wang, Yunhao Zhang, Ziao Guo, Tianyi Chen, Xiaokang Yang, and Junchi Yan. LinSATNet: The positive linear satisfiability neural networks. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 36605–36625. PMLR, 2023a. URL https://proceedings.mlr.press/v202/wang23at.html.
Sifan Wang, Xinling Yu, and Paris Perdikaris. When and why PINNs fail to train: A neural tangent kernel perspective. Journal of Computational Physics, 449:110768, 2022. doi: 10.1016/j.jcp.2021.110768.
Sifan Wang, Shyam Sankaran, Hanwen Wang, and Paris Perdikaris. An expert’s guide to training physics-informed neural networks, 2023b. URL https://arxiv.org/abs/2308.08468.
Billy M. Williams and Lester A. Hoel. Modeling and forecasting vehicular traffic flow as a seasonal ARIMA process: Theoretical basis and empirical results. Journal of Transportation Engineering, 129(6):664–672, 2003. doi: 10.1061/(ASCE)0733-947X(2003)129:6(664).
Bing Yu, Haoteng Yin, and Zhanxing Zhu. Spatio-temporal graph convolutional networks: A deep learning framework for traffic forecasting. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, pages 3634–3640. International Joint Conferences on Artificial Intelligence Organization, 2018. doi: 10.24963/ijcai.2018/505.