Source-linked AI summary
Generative AI and Machine Learning Collaboration for Container Dwell Time Prediction via Data Standardization
Minseop Kim, Takhyeong Kim, Taekhyun Park, Hanbyeol Park, Hyerim Bae
TL;DR
ICDT prediction is important for reducing container rehandling, but owner and cargo information are unstructured and difficult to use in ML models. The paper combines Gen AI standardization with ML prediction and EDI-based re-prediction, achieving improved ICDT prediction and fewer relocations in stacking simulations. The study also identifies consistency and input-length limitations in Gen AI standardization.
Problem
Unstructured owner and cargo information limits their effective use in ML models for individual import container dwell time prediction.
Method
The framework uses Gen AI to standardize owner and cargo information into hierarchical codes and integrates the outputs with ML-based ICDT prediction and EDI-triggered re-prediction.
Results
13.88% improvement in ICDT prediction and 8.50% average relocation reduction were achieved relative to the operational baseline.
Takeaways & Limitations
Applying standardized information and predicted ICDT to stacking strategies empirically demonstrates potential for improving container-terminal productivity.
Takeaways & Limitations
Gen AI standardization is not fully consistent, with consistency decreasing at deeper coding levels and when input information is insufficient.
Abstract
from arXiv · showhide
Import container dwell time (ICDT) prediction is a key task for improving productivity in container terminals, as accurate predictions enable the reduction of container re-handling operations by yard cranes. Achieving this objective requires accurately predicting the dwell time of individual containers. However, the primary determinants of dwell time-owner information and cargo information-are recorded as unstructured text, which limits their effective use in machine learning models. This study addresses this limitation by proposing a collaborative framework that integrates generative artificial intelligence (Gen AI) with machine learning. The proposed framework employs Gen AI to standardize unstructured information into standard international codes, with dynamic re-prediction triggered by electronic data interchange state updates, enabling the machine learning model to predict ICDT accurately. Extensive experiments conducted on real container terminal data demonstrate that the proposed methodology achieves a 13.88% improvement in mean absolute error compared to conventional models that do not utilize standardized information. Furthermore, applying the improved predictions to container stacking strategies achieves up to 14.68% reduction in the number of relocations, thereby empirically validating the potential of Gen AI to enhance productivity in container terminal operations. Overall, this study provides both technical and methodological insights into the adoption of Gen AI in port logistics and its effectiveness.
1. Introduction
Container terminals use stacking strategies to improve yard efficiency, but predicting individual import container dwell times is difficult because key owner and cargo information is unstructured. The study therefore combines Gen AI standardization with ML-based ICDT prediction and evaluates effects on terminal productivity.
- Operational motivation: Accurate ICDT prediction supports stacking strategies that reduce unnecessary yard-crane rehandling.Stacking decisions influence vessel handling time and relocation requirements.
- Research gap: Owner information and cargo information are important dwell-time determinants but remain difficult to incorporate systematically into ML models.These inputs are recorded as unstructured text.
- Proposed approach: The proposed framework uses Gen AI to standardize owner and cargo information before integrating the outputs into an ICDT prediction model.The study evaluates both prediction performance and resulting stacking-strategy outcomes.
- Evaluation: The paper evaluates the framework through ICDT prediction experiments and simulations of yard-crane relocations.The paper structure separates framework design, prediction evaluation, and stacking-strategy simulation.
2. Literature Review
Prior ICDT studies identify unstructured owner and cargo information as valuable but difficult to standardize and incorporate. Existing approaches face subjectivity, data-quality sensitivity, limited generalizability, and deployment constraints, motivating Gen AI-based standardization.
- ICDT prediction literature: Unstructured owner and cargo information are recognized as important ICDT factors, but systematic incorporation into ML models remains insufficient.This limitation motivates automated standardization methods.
- ICDT prediction literature: Manual cargo categorization can improve ICDT prediction, but subjective value-based criteria limit generalizability.Prior studies used category schemes based on cargo type or value density.
- Automated standardization: AI-based cargo standardization has shown predictive benefits, including up to 6% improvement in a binary yard-location classification task.The cited approach matched semantic cargo information to Standard International Trade Classification codes.
- Operational relevance: Accurate ICDT prediction can improve stacking strategies and reduce relocations, linking prediction quality to terminal operational efficiency.Prior work reported relocation benefits when ICDT predictions were applied to stacking decisions.
- Methodological limitations: Existing standardization methods often require large labeled datasets, generalize poorly beyond their source domain, and provide limited interpretability.These constraints reduce deployability in terminals requiring immediate, verifiable standardization.
- Gen AI motivation: Gen AI is presented as an alternative because pretrained knowledge can support direct standardization without complex preprocessing or task-specific training datasets.The reviewed discussion also describes web-search augmentation when information is insufficient.
3. Collaborative Framework for ICDT Prediction
The framework standardizes cargo and owner information with Gen AI and feeds the resulting hierarchical codes into ML-based ICDT prediction. It uses HS and KSIC coding, validation and web-search support, prompt design, and a reuse bank to structure deployment.
- Framework: The collaborative framework combines Gen AI standardization of cargo and owner information with ML-based ICDT prediction.Its overall architecture is illustrated in Figure 1.
- Coding systems: Cargo information is standardized with HS codes, while owner information is standardized with KSIC codes tailored to the Busan-port setting.The framework allows replacement of KSIC with a geographically appropriate industrial classification system.
- Prompting and implementation: Prompt design is treated as important because Gen AI output quality varies with the formulation of instructions and task descriptions.The study documents its prompts in appendices and selects Gemini 2.5 Flash for batch processing and cost efficiency.
- Standardization outputs: Both information types are converted into a three-level hierarchical structure, with validation labels indicating valid, insufficient, or invalid inputs.The reason field briefly explains the validation judgment.
- Information augmentation: Short or ambiguous owner information can trigger web searches when pretrained knowledge is insufficient for identification.This supplements Gen AI input before standardization.
- Cost-efficient deployment: The STD Bank stores standardized results and reuses them for repeated identical inputs to reduce repeated Gen AI calls.This mechanism addresses the monetary cost of Gen AI deployment.
Algorithm 1. Update Mechanism of Standardization Bank
The framework standardizes raw cargo and owner information with GenAI, reusing stored results through a Standardization Bank and updating predictions when EDI states change. Separate state-specific ML models use standardized, basic, and EDI-derived variables to predict remaining ICDT until container departure.
- Update Mechanism of Standardization Bank: The Standardization Bank reuses existing standardized results and stores newly generated outputs for later matching raw information.If no stored result exists, a prompt is sent to GenAI; its output is then added to the bank.
- Variables Generated from Gen AI: GenAI standardizes raw CI and OI text into model inputs, mapping X_raw to X_std through F_std.CI and OI are collected at unloading as text; standardized outputs include HS* and KSIC* codes.
- Input/Output Variables for ICDT Prediction: The model combines container attributes, temporal context, standardized information, and EDI-derived variables, with ICDT as the prediction target.Basic variables include size, type, country, carrier, day, and holiday; standardized categories can contain 4,346 HS codes and 343 KSIC codes at the finest level.
- EDI-based Variables: EDI events redefine ICDT as remaining dwell time from the current state to departure, with elapsed-time and due-date variables updated for CR and CP states.The temporal order is t_IN < t_CR < t_CP < t_OUT, and X_EDI contains ElapsedTime_e and DueDate_e.
- ICDT Definition and Prediction: Separate ML models predict ICDT for each EDI state, beginning at unloading and re-predicting after CR or CP updates until departure.The initial IN-state prediction excludes X_EDI; later state transitions trigger updated predictions to capture changes in the ICDT distribution.
4. Gen AI–Based Standardization of OI and CI
Gen AI standardizes unstructured owner and cargo information into hierarchical industry and HS codes while assessing whether inputs are suitable for standardization. The resulting standardized categories reveal meaningful differences in ICDT across cargo, owner, and combined classifications.
- Illustrative Examples of Standardization: Gen AI standardizes cargo descriptions into Level-2 HS code “2009” by identifying salient terms despite varied notations.Examples include “CONCENTRATE” and “CONC.” as equivalent expressions.
- Illustrative Examples of Standardization: Gen AI classifies owner information into Level-3 KSIC code “I561” and supplements insufficient owner information through web search.The examples concern Restaurants and mobile food service activities.
- Validation of Standardization Results: The validation mechanism distinguishes valid, insufficient, and invalid inputs, with Type-1 producing few non-matched standard codes and Type-2 or Type-3 identifying unsuitable inputs.For KSIC Type-1, non-matched cases were 0.004% at Level-1 and 0.013% at Level-2, while approximately 95% of Type-3 cases were non-matched.
- Validation of Standardization Results: For HS standardization, Type-1 non-matches occurred only at Level-3, whereas Type-2 non-matches reached 76.70% at Levels 1–2 and 95.28% at Level-3.Type-1 included 106,775 cases, while Type-2 included 6,190 cases.
- ICDT Distribution by Standardized Categories: Standardized KSIC and HS categories exhibit distinct ICDT values, including 54.29–89.86 h across selected manufacturing subcategories and 36.45–133.84 h across selected HS subcategories.The analysis uses high-frequency Level-1 categories and extracted subcategories, with distributions and independent t-tests summarized in Fig. 2.
- ICDT Distribution by Standardized Categories: Combining owner and cargo standardization reveals complementary ICDT heterogeneity: owner size has limited influence for perishable goods but significant differences for some product categories.The analysis examines ICDT distributions within Level-2 HS codes according to Gen AI–classified owner size.
5. ICDT Prediction Experiments
The experiments compare ICDT prediction with and without Gen AI-generated standardization across benchmark models and EDI states. Standardization generally improves conventional ML models, with Level-3 codes and CatBoost producing the strongest reported results.
- Experimental Settings: The experiments compare standardized and non-standardized ICDT prediction across benchmark models, three test ratios, and IN, CR, and CP EDI states.MAE is used because it represents absolute prediction error in time units; experiments are repeated 10 times.
- Model Performance Comparison: 13.88%, 11.90%, and 6.94% were CatBoost’s performance improvements across IN, CR, and CP states after adding standardized information.MAE decreased from 38.613, 26.913, and 2.033 to 33.253, 23.710, and 1.892.
- Standardization-Level Analysis: CatBoost with Level-3 HS and KSIC standardization achieved the best reported MAE values of 33.253, 23.710, and 1.892 across IN, CR, and CP states.The Level-3 combination improved over Level-1 by 8.50%, 7.74%, and 4.20%, respectively.
- Model Performance Comparison: Gen AI-based standardization achieved the best performance for XGBoost, LightGBM, CatBoost, SVR, and MLP.Among non-Gen AI methods, some models performed best without standardization, while LightGBM and CatBoost performed best with SBERT.
- Interpretability Analysis: HS and KSIC codes were highly influential across EDI states, while EDI-state variables such as ElapsedTime and DueDate contributed after customs clearance.Weekday and type were also identified as important variables.
- Interpretability Analysis: The relative importance of KSIC decreases from second in IN to fourth in CR because owner-related information becomes distributed across KSIC, ElapsedTime, DueDate, and weekday.ElapsedTime and DueDate are introduced at CR after customs clearance completion.
6. Simulation
The simulation applies predicted ICDT to container stacking decisions and compares the resulting relocations with a conventional strategy. It uses historical terminal data, sequential EDI updates, and operationally specified yard assumptions.
- Simulation Setup and Objective: The simulation evaluates whether the p-ICDT strategy reduces relocations relative to the conventional operational strategy.Predicted ICDT determines stacking positions, and yard occupancy is considered because it can affect relocation counts.
- Simulation Setup and Assumptions: The simulation uses 78,877 import containers, with 80% of historical data for model development and 20% reserved for simulation.CatBoost generates the predicted ICDT values used during simulation.
- Simulation Setup and Assumptions: Containers are simulated in yards with 12 rows, 20 bays, and 7 tiers, including separate areas for reefer containers and dedicated areas for 20 ft and 40 ft containers.These configurations are aligned with operational conditions at Busan port.
- Simulation Setup and Assumptions: ICDT is predicted at IN and re-predicted at CR and CP, with each updated value treated as the container’s current ICDT.Predicted ICDT decreases over time and is fixed at zero when negative.
- Relocation Definition: Relocations count containers stacked above a departing target container, with those containers re-stacked within the same yard using the same strategy.The simulation begins with random first-tier assignments and applies p-ICDT from the second tier onward.
- p-ICDT Stacking Strategy: The p-ICDT strategy stacks each new container on the topmost container location with the largest stored p-ICDT.This selects the location whose top container is predicted to remain in the yard longest.
Algorithm 2. ICDT-Based Yard Stacking Decision Process
The ICDT-based stacking process predicts dwell time when import containers enter, searches feasible yard positions, and updates predictions as container events occur. Simulations show that prediction-guided stacking reduces relocations, with benefits varying by yard occupancy and increasing when standardized information and EDI-based re-prediction are incorporated.
- Algorithm 2. ICDT-Based Yard Stacking Decision Process: The algorithm predicts ICDT for each import container, searches feasible positions, and stacks the container at the position with the highest retrieved ICDT.Container relocation is calculated when an outbound container requires moving containers stacked above it; affected containers are then re-stacked.
- Simulation Results: 8.50% average relocation reduction was achieved by the p-ICDT strategy relative to the baseline across all scenarios.Under maximum-occupancy conditions in Yards 2–4, the average reduction was 3.92%.
- Simulation Results: 12.66% relocation reduction was reached as occupancy decreased, while the rate increased only from 12.66% to 13.07% when average occupancy fell from 20% to 10%.At the target terminal’s average occupancy of 40%, the expected relocation reduction was 7.62%.
- Simulation Results: 20.52% greater relocation reduction was achieved by a-ICDT than p-ICDT in Yard 8, whereas the difference was only 2.77% in high-occupancy Yard 2.The comparison treats a-ICDT as a theoretical upper bound because it is practically unobservable.
- Simulation Results: More than 9.5% fewer stacking inversions occurred under p-ICDT than the baseline in the illustrated simulation snapshot.The figure compares the baseline and p-ICDT settings under identical conditions; inversions are highlighted in red.
- Effectiveness of Gen AI–Based Standardization: 19.76% average relocation reduction was achieved with standardization results under normal operating conditions, compared with 9.71% without them.During the highest-occupancy week, the benefit was 20.31% versus 1.56% at relatively low occupancy, but became negligible when occupancy exceeded 80%.
7. Discussion
The framework is designed for practical deployment, but its effectiveness depends on terminal-specific EDI events, reliable operational data, stable data distributions, and secure handling of sensitive information. Gen AI standardization also remains limited by output inconsistency, especially when cargo descriptions are short or ambiguous.
- Practical applicability: Gen AI usage fell from 26% of OI and 40% of CI to 4.82% and 29.92%, reducing cost from approximately 3.8 USD to 1.92 USD per 1,000 containers.The reduction is attributed to the STD Bank caching mechanism.
- Operational requirements: EDI-based re-prediction requires identifying terminal-appropriate EDI events in collaboration with domain experts.A Terminal Appointment System can support initial prediction at unloading and subsequent refinement after later events.
- Operational requirements: Reliable ICDT prediction requires systematic operational standards and stakeholder collaboration to produce training data with meaningful relationships to ICDT.Before adopting prediction technologies, terminals should establish an operational system that guarantees ICDT predictability.
- Operational requirements: Shifting operational data distributions can gradually degrade prediction performance, requiring periodic model updates such as online learning.The model predicts future ICDT from past observations, making distribution shifts a reliability challenge in deployment.
- Security and privacy: Gen AI processing of CI and OI raises security concerns because these data contain sensitive cargo and ownership information.Proposed safeguards include port-authority infrastructure or on-premise deployment within terminals.
- Standardization limitations: Consistency rates declined from 98.44% at Level-1 to 90.31% at Level-3 for CI and from 96.15% to 84.05% for OI.Short inputs averaged approximately 20 characters in invalid cases versus 85 characters when standardization was feasible.
8. Conclusion and Future Research
The study combines Gen AI standardization with EDI-based re-prediction to improve ICDT prediction and container stacking. The results indicate potential productivity and environmental benefits, while future work targets more consistent and resource-efficient standardization.
- Conclusion: 13.88% improvement in ICDT prediction was achieved by combining Gen AI-based standardization and EDI-based re-prediction.The framework was evaluated using container-terminal data.
- Conclusion: 8.50% average and 13.07% maximum relocation reductions were achieved relative to the operational baseline.Using the same prediction model and other variables, Gen AI standardization added a 3.10% average relocation reduction.
- Implications: Reducing unnecessary yard-crane relocations suggests a pathway toward improving productivity and environmental performance for the same container workload.The proposed stacking strategy is presented as a way to improve equipment-use efficiency.
- Future research: Future research should improve standardization consistency through prompt engineering, multi-agent validation, and retrieval-augmented generation.Additional work is also proposed on resource-efficient deployment.
Appendix 1. Prompt of KSIC code Standardization
The KSIC prompt instructs Gen AI to classify owner information into Korean industrial classification codes and company-size categories, while validating the sufficiency of the information and returning a strict JSON object.
- Task definition: The prompt uses owner information, relevant web search results, and a strict JSON schema for KSIC standardization.The assistant is framed as a Port EDI Data Standardization Assistant and corporate industrial-classification expert.
- Classification: KSIC classification assigns a high-level section, middle-level division, and low-level group code.The levels are represented by one uppercase letter, two digits, and three digits, respectively.
- Validation: Validation distinguishes valid information, insufficient or ambiguous information, and invalid information through type1, type2, and type3.The categories correspond to different confidence and standardizability conditions.
- Output schema: The output includes owner, company size, KSIC codes, validation status, and an explanation of the standardization result.Company size must be SME, Mid, Large, or Unknown.
Appendix 2. Prompt of HS code Standardization
The HS-code prompt standardizes cargo descriptions using the cargo’s essential characteristics, validates classification confidence, and returns hierarchical codes and supporting tokens in a strict JSON format.
- Task definition: The prompt standardizes cargo information at the 2-, 4-, and 6-digit HS-code levels using the official HS system.Each level represents a chapter, heading, or subheading.
- Classification: HS classification considers material or composition, primary function or use, processing degree or form, and finished-versus-part status.These attributes determine the cargo’s essential nature for classification.
- Validation: Validation assigns type1, type2, or type3 for sufficient, insufficient or ambiguous, or invalid information.The categories encode whether standardization can be performed with confidence.
Appendix 3. Abbreviations
This appendix lists abbreviations for container dwell-time prediction, data standardization, machine learning, and related methods and classification systems.
- ICDT denotes Import Container Dwell Time, while p-ICDT and a-ICDT denote predicted and actual import container dwell time.
- HS Code, NAICS, and KSIC denote Harmonized System Code, North American Industry Classification System, and Korean Standard Industrial Classification.
- FTT, NODE, XGBoost, LightGBM, CatBoost, SVR, and MLP identify tabular or predictive modeling methods.Their expanded names include FT-Transformer, Neural Oblivious Decision Ensembles, Extreme Gradient Boosting, Light Gradient Boosting Machine, Categorical Boosting, Support Vector Regression, and Multi-Layer Perceptron.
- Gen AI, ML, LLM, DL, NLP, and EDI denote Generative Artificial Intelligence, Machine Learning, Large Language Model, Deep Learning, Natural Language Processing, and Electronic Data Interchange.
- CI and OI denote Cargo Information and Owner Information, while STD denotes Bank Standardization.
- MAE denotes Mean Absolute Error, and SHAP denotes Shapley Additive Explanations.
Appendix 4. Configurations of Gen AI (Gemini 2.5 Flash)
The Gen AI configuration specifies sampling parameters and response-generation limits for Gemini 2.5 Flash. Settings include temperature 1, top_p 0.95, top_k 64, and one response variation.
- Temperature is set to 1 and controls the degree of randomness in token selection.
- top_p is set to 0.95, selecting tokens from most to least probable until their cumulative probability reaches the specified value.
- top_k is set to 64, limiting each token-selection step to the 64 highest-probability tokens before top_p filtering and temperature sampling.
- candidate_count is set to 1, returning one response variation, while max_output_tokens specifies the maximum response length.