Temporal locality loss is an optimization objective used in time-series representation learning that encourages a model to preserve the chronological proximity and continuity of temporal data within its latent feature space. It operates by penalizing representations where samples or segments that occur close together in time are positioned farther apart than those separated by larger time intervals. By enforcing this structural constraint, the loss ensures that neighboring time points maintain higher feature similarity than distant ones, helping neural networks capture realistic sequential dynamics and temporal smoothness without treating chronologically adjacent observations as unrelated samples.