Criminal case matching endeavors to determine the relevance between different criminal cases. Conventional methods predict the relevance solely based on instance-level semantic features and neglect the diverse legal factors (LFs), which are associated with diverse court judgments. Consequently, comprehensively representing a criminal case remains a challenge for these approaches. Moreover, extracting and utilizing these LFs for criminal case matching face two challenges: (1) the manual annotations of LFs rely heavily on specialized legal knowledge; (2) overlaps among LFs may potentially harm the model's performance. In this paper, we propose a two-stage framework named Diverse Legal Factor-enhanced Criminal Case Matching (DLF-CCM). Firstly, DLF-CCM employs a multi-task learning framework to pre-train an LF extraction network on a large-scale legal judgment prediction dataset. In stage two, DLF-CCM introduces an LF de-redundancy module to learn shared LF and exclusive LFs. Moreover, an entropy-weighted fusion strategy is introduced to dynamically fuse the multiple relevance generated by all LFs. Experimental results validate the effectiveness of DLF-CCM and show its significant improvements over competitive baselines. Code: https://github.com/jiezhao6/DLF-CCM.
Accurate traffic flow forecasting requires jointly modeling temporal dynamics and interactions among sensors. Although recent Transformer-based methods improve cross-variate modeling, they often compress numerous historical tokens into a few shared representations or aggregate information densely across variables and periods. Such designs may weaken fine-grained temporal cues and introduce contexts weakly related to the current sensor-patch query. To address these issues, we propose CoSTaR, a context-guided spatio-temporal adaptive retrieval framework for multivariate traffic flow forecasting. CoSTaR preserves original sensor-patch representations and uses compressed contexts to guide query-specific information retrieval. Specifically, Spatio-Temporal Context Compression constructs topology-aware context tokens through graph-based aggregation over sensors and temporal windows. Causal Spatio-Temporal Retrieval then uses these contexts to identify spatially related and temporally valid historical regions, and restores their original-resolution tokens for fine-grained attention. A sliding-window branch further captures recent sensor-specific dynamics, while a query-dependent gate adaptively integrates the complementary representations. Experiments on PEMS03, PEMS04, and PEMS08 show that CoSTaR achieves the lowest average MSE and MAE among the compared methods and outperforms the selected strongest competing methods across the evaluated horizons. Ablation and visualization studies further support the effectiveness and complementary roles of the proposed components.