Source-linked AI summary
APPSolver: Adaptive Patch Partitioning for Point-Wise Ship Flow Prediction on Unstructured Meshes
Wenhua Huo, Fenglei Han, Wangyuan Zhao, Xiao Peng, Chunhui Wang, Jialin Wu, Jiayi Han
TL;DR
Ship hydrodynamics surrogates must process large, non-uniform point sets efficiently. APPSolver uses deterministic, distance-refined quadtree patches with downsampling and full-reference recovery for fixed 2D slices. Its supported contribution is a computationally efficient representation with an explicit accuracy–efficiency trade-off, not universal predictive superiority or established long-horizon dynamics.
Problem
Large ship-CFD point sets are non-uniform, making direct surrogate modeling costly and motivating representations that preserve spatial organization efficiently.
Method
APPSolver combines distance-refined Adaptive Patch Partitioning, patch downsampling, full-reference recovery, and a Transformer with optional condition encoders.
Results
Adaptive partitioning reduces MAE relative to uniform-plus-learned partitioning by 24.9%, 19.7%, and 16.4% on DTC, KCS, and KVLCC2, respectively.
Takeaways & Limitations
APP is supported as a compact spatial representation with lower model-forward cost, while learned tokenizers and persistence remain more accurate under the corrected protocol.
Takeaways & Limitations
The absolute next-state objective does not establish accurate long-horizon dynamics, and evaluation is limited to fixed non-uniform 2D draft-plane slices rather than 3D meshes or moving free surfaces.
Abstract
from arXiv · showhide
Large non-uniform point sets make direct attention-based surrogate modeling costly for ship hydrodynamics. We introduce APPSolver, a point-wise flow-prediction framework built around Adaptive Patch Partitioning (APP), a deterministic quadtree representation for fixed two-dimensional horizontal slices extracted from ship CFD simulations. APP assigns finer patches near the hull and coarser patches farther away, downsamples patch contents, and recovers predictions to the full reference point set. Under a corrected protocol that constructs natural $(t,t+1)$ pairs before splitting, reuses training-set normalization statistics, and reports three model seeds, learned tokenizers are more accurate than APP-Transformer, and a persistence baseline has lower one-step MAE on all three ShipBench hulls. The supported benefit of APP is therefore computational rather than universal predictive superiority: on a representative DTC input, APP-Transformer requires 1.815 GFLOPs and 1.309 ms per model forward, while a matched ablation shows that adaptive partitioning reduces MAE by 16.4-24.9\% relative to a uniform partition augmented with learned slicing. Condition encoders provide setting-dependent gains in leave-one-hull-out evaluation, but the current absolute next-state objective does not establish accurate long-horizon dynamics. These results characterize APP as a compact spatial representation with an explicit accuracy--efficiency trade-off. Code is available at https://github.com/wenhuahuo/APPSolver .
1 Introduction
APPSolver addresses costly surrogate modeling for non-uniform ship-CFD point sets with deterministic adaptive patch tokenization. The paper audits one-step prediction and characterizes explicit accuracy–efficiency trade-offs rather than claiming universal predictive superiority.
- Ship-CFD point sets are strongly non-uniform, with refinement near hulls and wakes and coarser far-field sampling.
- APP forms finer quadtree patches near the hull and coarser patches farther away, then downsamples and recovers predictions to all reference points.
- The benchmark constructs natural (t, t+1) pairs before splitting, uses training statistics for normalization, and evaluates recovered full-reference predictions.
- A matched ablation compares adaptive, uniform, and uniform-plus-learned partitions while separating model-forward efficiency from end-to-end cost.
- Learned tokenizers and persistence are more accurate under the corrected protocol, while APP-Transformer has substantially lower measured model-forward cost.
2 Related work
Related work spans regular-grid, graph, operator, and Transformer approaches for physical-field prediction. APPSolver instead emphasizes deterministic spatial partitioning that preserves non-uniform ship-CFD organization while targeting model-forward cost.
- Regular-grid methods offer uniform tensors and efficient computation but can alter ship-CFD sampling through interpolation and add redundant far-field samples.
- Graph and irregular-mesh methods explicitly use mesh connectivity or geometry-aware representations for physical-field prediction.
- Figure 1 depicts APP partitioning, optional condition-token encoding, Transformer prediction, and distance-weighted recovery to the full reference set.
- APPSolver’s distinction is not a new point-to-token principle but a deterministic quadtree prior with downsampling, full-reference recovery, and accuracy–cost evaluation.
3 Method
APPSolver formulates one-step prediction on fixed non-uniform 2D ship-flow slices and uses APP to create compact spatial tokens. The pipeline refines token granularity by hull distance, downsamples patch contents, and restores outputs to the original points.
- Problem formulation: The framework maps a fixed reference point set, current flow state, and condition token to a predicted next flow state.
- Problem formulation: The target preserves a fixed non-uniform 2D draft-plane point set with two spatial coordinates and four physical channels.
- Data preparation: KDTree reorders frames to a common reference, after which chronological adjacent pairs are formed before splitting and normalization uses training data.
- Adaptive patch partitioning: APP recursively partitions the original CFD points into local quadtree patches, using distance to the hull as a deterministic refinement proxy rather than explicit wake or gradient detection.
- Adaptive patch partitioning: Smaller target capacities create more near-hull patches, while larger capacities preserve coarser aggregation farther away without interpolating onto a regular grid.
- Adaptive patch partitioning: Spatial downsampling limits patch budgets, preferentially preserves near-field points, and uses masks for real points versus padding.
- Tokenization and recovery: Patch inputs and outputs are organized as fixed-size token tensors, then recovered with distance-weighted k-nearest-neighbor interpolation using k = 4.
- Condition encoding: The condition interface supports zero conditioning, numerical MLPs, Fourier features, FiLM, and frozen Qwen encoders, with offline LLM encoding excluded from forward timing.
4 Experiments
Experiments compare APPSolver with persistence and learned tokenizers under a corrected ShipBench protocol, then test CFDBench robustness, partition choices, token budgets, conditioning, and autoregressive rollout. Persistence and tuned learned tokenizers generally achieve stronger accuracy, while adaptive partitioning improves matched APPSolver ablations and condition gains vary by held-out hull.
- Corrected main comparison: Persistence achieves the lowest overall MAE on every ShipBench hull, while UPT, PCNO, and Transolver are the strongest learned methods on DTC, KCS, and KVLCC2, respectively.APP-Transformer remains competitive on selected relative L2 and MSE comparisons, so rankings depend on the metric.
- Corrected main comparison: 17.4%, 6.8%, and 9.7% are the MAE gaps between the strongest learned model and persistence on DTC, KCS, and KVLCC2, respectively.Persistence is better in 11 of 12 hull–channel comparisons; APP-Transformer is better only for prgh on KVLCC2.
- CFDBench comparison: PCNO is best on cavity, dam, and cylinder, while UPT is best on tube; APP-Transformer does not obtain the best MAE on any CFDBench task.The paper treats CFDBench as an external robustness comparison rather than evidence of uniform superiority.
- Adaptive partition and learned-token ablations: 24.9%, 19.7%, and 16.4% are the MAE reductions from adaptive partitioning versus uniform-plus-learned partitioning on DTC, KCS, and KVLCC2, respectively.The comparison keeps the production APP-Transformer architecture matched across adaptive, uniform, and uniform-plus-learned strategies.
- Adaptive partition and learned-token ablations: Tuned Transolver and UPT token budgets remain more accurate than APP-Transformer under the same 16,000-step training budget.The sweep targets token budgets rather than providing an exhaustive architecture-specific hyperparameter search.
- Condition-encoder comparison: Qwen3.5 reduces leave-one-hull-out MAE relative to zero conditioning by approximately 3.0%, 4.5%, and 1.0% on DTC, KCS, and KVLCC2, respectively.Zero conditioning is best in the full-data setting, while numeric encoders remain competitive.
- Fifty-step autoregressive rollout: 6.01, 3.81, and 6.44 are APP-Transformer’s cumulative MAE ratios through step 50 on DTC, KCS, and KVLCC2, respectively.APP-Transformer remains finite for 50 steps but is less accurate than persistence at every reported horizon; the rollout uses one model seed.
5 Limitations and conclusion
The paper frames APPSolver as a deterministic adaptive tokenization and recovery pipeline with an explicit accuracy–efficiency trade-off. Its predictive and geometric scope remains limited, especially for long-horizon dynamics, broader hull coverage, and full 3D settings.
- Persistence has lower one-step MAE than every learned model on all three ShipBench hulls.
- No learned model achieves cumulative 50-step MAE below persistence, so accurate long-horizon dynamics are not established.The authors identify residual prediction, multi-step training, or dynamics-aware objectives as needed before reliable rollout.
- APPSolver is evaluated on fixed non-uniform 2D horizontal slices rather than moving free surfaces, native mesh connectivity, or 3D volume meshes.An octree is suggested for 3D data but has not been implemented or evaluated.
- The reported latency measures model forward only and excludes APP construction, data transfer, condition encoding, and k-NN recovery.
- Within these boundaries, matched ablations support adaptive partitioning while profiling shows lower model-forward cost at the price of lower predictive accuracy.Condition-token gains can assist held-out-hull transfer, but the conclusion is not universal predictive superiority.
A Detailed experimental setup
The appendix provides the full experimental configuration described in Section 4.1.
- The appendix contains the full experimental configuration.
- Its configuration corresponds to the setup described in Section 4.1.
- The passage identifies the appendix as the source of the detailed experimental setup.
A.1 Datasets
The experiments use ShipBench and CFDBench data, with ShipBench covering three hulls, two speeds, unsteady sequences, and fixed non-uniform 2D slices.
- ShipBench covers DTC, KCS, and KVLCC2 at design speed and twice design speed.
- Each ShipBench case contains about 70 seconds of unsteady evolution exported every 0.2 seconds, yielding roughly 350 frames.
- Fixed horizontal slices at ship draft contain approximately 26k–44k non-uniform reference points.
A.2 Baselines and evaluation protocol
The study compares APP-based models with several irregular-mesh and point-set baselines under unified interfaces, training pipelines, and evaluation protocols.
- Comparison methods include APP-based Transformer and DPT models alongside Transolver, FNO, UPT, GNOT, Fusion-DeepONet, and PCNO.
- The first four baseline methods use unified data interfaces, training pipelines, and evaluation protocols.
- Model parameter configurations are adjusted so all models contain approximately 1M parameters.
A.3 Training and selection protocol
The training protocol constructs chronological adjacent-frame pairs before splitting, reuses training statistics for validation and rollout, and selects checkpoints by validation MAE. A small set of memory-constrained runs used batch size 2 instead of the default batch size 4.
- Pair construction and splitting: Natural (t, t + 1) pairs are constructed chronologically before the 0.8/0.2 training/validation split with split seed 42.Training statistics are reused for validation and rollout.
- Optimization and selection: 16,000-step Adam training uses learning rate 10−4 and batch size 4, with evaluation every 2,000 steps.The checkpoint with minimum validation MAE is selected retrospectively, using the earlier checkpoint for exact ties.
- Resource exception: 11 memory-limited runs were rerun with batch size 2 after exceeding the 48-GB NVIDIA RTX A6000 capacity.The exception affected specified Cavity and Tube model-seed runs, so batch size was not perfectly matched for them.
- Losses and evaluation: APP models compute masked losses on valid patch slots and are evaluated after distance-weighted k-NN recovery to the full reference point set.Main-text metrics prioritize MAE and relative L2, while MSE and RMSE remain squared-error diagnostics; default errors are in normalized space.
B Forward computation profiling
Forward computation uses APP as an intermediate tokenization mechanism for fixed two-dimensional CFD slices, then recovers predictions at every reference point. Profiling on a representative DTC input compares APP's compact patch-token computation with point-based alternatives under specified GPU timing conditions.
- Representation and output: APP-Transformer uses P = 1171 patch tokens and a post-downsampling budget of 153 slots, whereas point-based baselines use N = 26101 points.APP models retain the full reference-point output boundary through recovery.
- Profiling protocol: Table 8 reports representative DTC model-forward profiling on an NVIDIA RTX A6000 using median latency over 200 CUDA-Event measurements after 50 warm-up iterations.The table distinguishes final-checkpoint profiling from best-validation checkpoints used in accuracy tables.
- Input and state: APP uses x and y coordinates from a fixed horizontal slice, with dx = 2, while the flow state has du = 4 channels: u, v, w, and pressure prgh.The formulation treats the horizontal reference set as spatially fixed across time and uses adjacent-frame supervision.
- Forward objective: The model maps original CFD coordinates, the current flow state, and optional case conditions to the next-time-step point-wise flow field.The interval is one exported frame, or 0.2 s, and the objective predicts the absolute next state.
- APP computation: APP aggregates reference points into patch tokens, predicts retained-slot values, and recovers outputs to every reference point with distance-weighted k-NN interpolation.Condition information can be fused with patch tokens but is optional and setting-dependent.
D.1 Data-driven ship hydrodynamics and design surrogates
Ship hydrodynamics combines costly high-fidelity simulation with data-driven surrogates intended to accelerate evaluation and design exploration. Existing token-based and conditional scientific-learning methods provide context for APPSolver's representation and conditioning choices.
- Motivation: High-fidelity CFD resolves spatial flow distributions but is costly across hull types and operating-condition combinations.Model testing is physically reliable but also costly, while empirical methods are efficient but limited in scope and geometric parameterization.
- Surrogate modeling: Data-driven surrogates learn approximate mappings from hull parameters and operating conditions to resistance, heave, trim, or local flow fields.Their intended uses include rapid performance evaluation and design-space exploration.
- Token-based representations: Token representations support global-dependency modeling in visual and physical-field learning through architectures such as Transformers, ViT, and related token-based formulations.These precedents motivate organizing scientific inputs or fields as tokens rather than relying only on regular-grid representations.
- Conditional modeling: Conditional scientific-learning methods combine functions, query positions, geometry, physical parameters, or fields as inputs to shared representations.The supplied discussion places APPSolver alongside DeepONet, GNOT, Transolver, and UPT while noting that conditioning value depends on the training and held-out hull.