To improve online milling chatter monitoring under small-sample conditions, this study proposes a Siamese Transformer network that combines self-attention-based global temporal modeling with Siamese metric learning. Multi-source force and vibration signals are denoised, normalized, segmented into fixed-length windows, and dynamically paired to increase cross-sample relational information without collecting additional cutting data. A shared-weight Transformer backbone extracts temporal features from paired samples, and the model is trained using a joint contrastive and cross-entropy loss with Bayesian hyperparameter optimization. Cutting experiments on TC4 titanium-alloy thin-walled parts show that the proposed method achieves 99.91% recognition accuracy for idle, stable cutting, and chatter states on an independent test set. Under an extreme small-sample setting with only 100 training samples, the accuracy remains 91.81%, outperforming CNN, LSTM, and standard Transformer baselines. Feature-space visualization and attention heatmaps further provide qualitative evidence that the model learns compact state clusters and tends to focus on signal regions associated with envelope variation and transient chatter fluctuations.
Zhan et al. (Wed,) studied this question.