HPNet is a novel dynamic trajectory forecasting method designed to improve the accuracy and stability of predicting future trajectories of road agents in autonomous driving systems. Unlike traditional static methods that use fixed historical frames, HPNet incorporates historical predictions to model the dynamic relationship between successive forecasts. This approach enhances the correlation between predictions, leading to more consistent and accurate trajectory forecasts. The core of HPNet is the Triple Factorized Attention module, which combines Agent Attention, Historical Prediction Attention, and Mode Attention to capture interactions between agents, predictions, and modes. This module enables the model to dynamically encode the relationship between current and historical predictions, extending the attention range beyond the visible historical window. Experiments on the Argoverse and INTERACTION datasets show that HPNet achieves state-of-the-art performance, generating accurate and stable future trajectories. The method also demonstrates improved accuracy and stability by considering the relationship between successive predictions, which is crucial for reliable autonomous driving decisions. HPNet's ability to handle complex scenarios and provide multimodal outputs makes it a significant advancement in trajectory prediction for autonomous systems.HPNet is a novel dynamic trajectory forecasting method designed to improve the accuracy and stability of predicting future trajectories of road agents in autonomous driving systems. Unlike traditional static methods that use fixed historical frames, HPNet incorporates historical predictions to model the dynamic relationship between successive forecasts. This approach enhances the correlation between predictions, leading to more consistent and accurate trajectory forecasts. The core of HPNet is the Triple Factorized Attention module, which combines Agent Attention, Historical Prediction Attention, and Mode Attention to capture interactions between agents, predictions, and modes. This module enables the model to dynamically encode the relationship between current and historical predictions, extending the attention range beyond the visible historical window. Experiments on the Argoverse and INTERACTION datasets show that HPNet achieves state-of-the-art performance, generating accurate and stable future trajectories. The method also demonstrates improved accuracy and stability by considering the relationship between successive predictions, which is crucial for reliable autonomous driving decisions. HPNet's ability to handle complex scenarios and provide multimodal outputs makes it a significant advancement in trajectory prediction for autonomous systems.