Just-In-Time Defect Prediction (JITDP), as an important means to improve software quality and reduce maintenance costs, has received widespread attention in recent years. However, existing methods generally neglect multi-scale temporal features during the development process, lack dynamic modeling of developer behavior and project lifecycle, and have limited robustness when facing concept drift. To address these limitations, this paper proposes a novel Multi-Scale Temporal Defect Prediction framework (MSTDP) that integrates commit behavior patterns at temporal granularities of hours, days, and weeks, combining code semantic information, developer behavioral features, and lifecycle-aware mechanisms to comprehensively characterize the dynamic evolution patterns of defect introduction. MSTDP achieves deep feature fusion through cross-attention mechanisms and constructs a concept drift analysis module to enhance the model’s adaptability across different evolutionary stages. Empirical results on 9 large-scale open-source projects demonstrate that MSTDP achieves optimal performance across all evaluation metrics: average accuracy of 76.89% (0.56% improvement), precision of 61.02% (0.53% improvement), recall of 67.82% (0.64% improvement), F1-score of 60.93% (0.46% improvement), and AUC of 81.88% (0.52% improvement), significantly outperforming 7 mainstream baseline methods including JITBoost, FENSE, and JIT-CF. Wilcoxon signed-rank tests confirm the statistical significance of these improvements (\(\varvec{p < 0.05}\)). The research results validate the effectiveness of this method for efficient and accurate defect prediction in dynamic software engineering environments, demonstrating stronger generalization capability and robustness against concept drift.
In the field of financial technology, stock prediction has become a popular research direction due to its high volatility and uncertainty. Most existing models can only process single temporal features, failing to capture multi-scale temporal patterns and latent cyclical components embedded in price fluctuations, while also neglecting the interactions between different stocks–resulting in predictions that lack accuracy and stability. The StockMixer with ATFNet model proposed in this paper integrates both time-domain and frequency-domain features. By fusing information from both domains, the deep neural network significantly improves prediction accuracy and reliability. While temporal feature analysis is common, frequency-domain features, derived via spectral analysis (e.g., Fourier Transform), can reveal latent periodicities and seasonality patterns in price movements. This study employs an adaptive fusion approach to allow the two types of features to complement and enhance each other. The main innovations of this model are reflected in three aspects: (1) Construction of a time-channel hybrid model (MultTime2dMixer) to decouple the temporal evolution and inter-channel interactions of multivariate time series. (2) A novel non-graph-based stock relation modeling approach (NoGraphMixer) is proposed, which employs a learnable attention-based mapping mechanism to dynamically capture cross-stock dependencies without relying on pre-defined or static graph structures–thereby overcoming the inflexibility of conventional graph-based relation encoders. (3) Integration of a frequency-domain complex attention model (ATFNet) to model discontinuities in both the time and frequency domains, providing a strong supplement to time-domain modeling. At the implementation level, the original stock sequences are subjected to bidirectional feature extraction along both time and channel dimensions. NoGraphMixer is then used to construct implicit stock correlations. ATFNet is applied to map time-series data into both the temporal and frequency domains, extracting spectral features. Finally, a fusion mechanism integrates multimodal information to achieve effective fusion of multi-source data. Experimental results show significant improvements in classification evaluation metrics (Accuracy, Precision, Recall, F1-score) for predicting price movement direction, as well as in metrics assessing the ranking ability of return predictions and backtesting performance–IC, RIC, Prec@N, and Sharpe Ratio (SR).