## 1 Introduction  
Recent advances in flexible manufacturing have heightened demands to release traditional industrial robots from repetitive tasks under controlled conditions. Robots are expected to complete tasks with humans in a shared workspace named human-robot coexistence [1]. Human-robot skill transfer plays a key role for the robot to learn new skills from humans and adapt to new, constantly changing task scenarios. In this context, Learning from Demonstration (LfD) [2, 3, 4, 5, 6] frameworks have been proposed, where robots learn tasks by observing and imitating human demonstrations. A core component of LfD are the Movement Primitives (MPs), which are well-established movement encoding methods with temporal and spatial modulation; complex tasks are accomplished by sequencing and combining different MPs [7]. For MPs learning, the basic-level capability refers to generalizing the task start, end, and intermediate points (via-points) under varying conditions while preserving the demonstration features, even for points outside the range (extrapolation ability); the research methods generally involve deterministic and probabilistic approaches. Deterministic methods, such as Dynamic Movement Primitives (DMPs) [8], model movements with forced nonlinear differential equations. DMPs generalize from a single demonstration but lack support for via-points or multiple trajectory statistics, and their extrapolation depends on start-to-goal relative distances. Probabilistic methods, such as Gaussian Mixture Models with Gaussian Mixture Regression (GMM-GMR) [9], Probabilistic Movement Primitives (ProMPs) [10], and Kernelized Movement Primitives (KMPs) [11], encode the mean and variance of multiple trajectories. GMM-GMR models the joint probability distributions using GMM and derives the task execution parameters via GMR, but struggles with via-point adaptation and extrapolation. ProMPs use basis functions and hierarchical Bayesian models to generalize via-points through conditional probability, but require extensive demonstrations and face extrapolation limits. KMPs avoid explicit basis functions, offering a non-parametric approach for high-dimensional tasks. They generalize via-points effectively and exhibit robust extrapolation, but suffer from numerical instability and high computational costs as timesteps increase. To combine deterministic and probabilistic approaches, Probabilistic Dynamic Movement Primitives (ProDMPs) [12] convert DMPs numerical integration into basis functions for encoding ProMPs, utilizing deep neural networks (NNs) for nonlinear trajectory conditioning. ProDMPs enhance via-point adaptation through NNs but exhibit limited extrapolation when via-points exceed the demonstration range. The core level of MPs' learning focuses on adapting MPs to unknown task scenarios, termed MPs adaptation. These scenarios involve task constraints, expressed as inequality equations in Joint and Cartesian space, including position/velocity limits, obstacles, and virtual walls. Extensive research on MPs adaptation has been conducted under various frameworks. Deterministic methods, such as DMPs, enhance obstacle avoidance by applying repulsive forces in the acceleration domain for multiple obstacles [13] and non-point obstacles [14]. Position limits are addressed through exogenous state transformations [15], while velocity limits are managed via time-governed differential equations [16]. DMPs compute efficiently as constraints are directly integrated, avoiding iterative processes. However, they struggle with simultaneous Joint and Cartesian space constraints, particularly under multiple repulsive forces, leading to local minima. DMPs also lack adaptability to nonlinear constraints and exhibit limited generalization, as they are tailored to specific trajectories, restricting flexibility in goal-reaching. Probabilistic methods, such as ProMPs, encode variations through covariance matrices to satisfy task constraints. For example, ref.