1. Introduction
With the advent of Industry 4.0, Artificial Intelligence (AI) technologies are accelerating the intelligence of manufacturing systems, particularly in the domain of Computer Numerical Control (CNC) machining. Among various anomalies occurring in machining processes, chatter, a self-excited vibration arising from the interaction between the tool and the workpiece, remains a persistent challenge [1]. Chatter not only degrades the surface roughness of machined parts, leading to quality defects, but also accelerates tool wear and, in severe cases, causes permanent damage to the spindle.
Traditional approaches to chatter detection have largely relied on the Stability Lobe Diagram (SLD) derived from the dynamic equations of the machining system [2]. While the SLD provides physically rigorous criteria, generating it requires precise identification of the system's transfer functions, which vary depending on tool position and wear status. Due to these limitations, data-driven approaches using Deep Learning (DL) have recently gained attention. Models such as Convolutional Neural Networks (CNN) and Long Short-Term Memory (LSTM) have demonstrated superior performance in determining process stability by taking sensor data as input [3].
However, the efficacy of standard deep learning models heavily depends on the availability of high-quality labeled datasets. In actual industrial settings, accurately labeling chatter occurrence intervals on a frame-by-frame basis is prohibitively expensive and requires domain expert knowledge. Furthermore, compared to normal machining data, the frequency of chatter occurrence is extremely low, leading to severe class imbalance problems [4]. Classifiers trained on such data tend to be biased towards the majority class (normal), resulting in a high rate of false negatives where actual dangerous chatter situations are undetected.
To overcome these limitations, the Physics-Informed Neural Networks (PINN) paradigm, which integrates physical information into the learning process, has emerged [5]. While PINNs have been primarily used for solving differential equations, their application to classification problems in the manufacturing domain remains limited.
In this paper, we propose a Physics-Regularized Attention Network (PRA-Net) framework that combines the representation learning capability of deep learning with the robustness of physical laws. Unlike traditional supervised learning, this study introduces a self-supervised pseudo-labeling strategy based on vibration energy thresholds. Additionally, we train the model by defining a physics-guided loss function that penalizes predictions violating the physical energy thresholds.
The main contributions of this study are as follows:
1. We propose a weakly supervised learning fra mework that eliminates the manual data lab eling process by utilizing physics-based ener gy constraints.
2. We extract spatiotemporal features of chatte r effectively through the PRA-Net, which co mbines 1D-CNN, Bi-LSTM, and an Attention mechanism.
3. We demonstrate that by integrating physical constraints into the loss function, the model achieves an F1-Score of 0.933 and secures d eterministic reliability by forming clear decis ion boundaries.
2. Background & Related Work
Chatter detection technology has evolved with advancements in signal processing theory and artificial intelligence. In this section, we categorize existing studies into (1) Traditional Signal Processing and Machine Learning, (2) Deep Learning-Based Anomaly Detection, and (3) Physics-Informed Learning, and describe the distinctiveness of the proposed methodology.
2.1. Traditional Signal Processing and Machine Learning
Early chatter research focused on physical modeling of the cutting process. Altintas [1] established the regenerative chatter theory and proposed methods to optimize process parameters using the Stability Lobe Diagram (SLD). However, such analytical models have limitations in reflecting dynamic parameters that change along the tool path in real-time.
Consequently, monitoring techniques based on sensor signals have developed. Gryllias and Antoniadis [3] extracted features from acceleration signals through cyclostationary analysis and applied Hidden Markov Models (HMM) to diagnose tool wear and abnormal states. Additionally, numerous studies have extracted time-domain features such as RMS, Kurtosis, and Skewness, as well as frequency-domain features like FFT peak ratios, and applied classical machine learning algorithms like Support Vector Machine (SVM) or Random Forest [4]. These methods largely depend on the quality of hand-crafted features and have the disadvantage of being difficult to design effective features without expert domain knowledge.
2.2. Deep Learning-Based Anomaly Detection
The advent of Deep Neural Networks enabled the automation of feature extraction, also known as feature learning. For instance, researchers proposed a chatter detection technique that applies Wavelet Transform to acceleration signals to generate 2D scalograms, which are then processed by a Deep CNN. While this approach achieved high accuracy without manual feature extraction, it incurred high computational costs during the preprocessing stage.
Li et al. [6] proposed a deep learning model that operates robustly even when machining conditions change by utilizing Domain Adaptation techniques. They mitigated the data scarcity problem to some extent by transferring knowledge learned in the source domain to the target domain. However, such pure data-driven approaches still require large amounts of labeled data and suffer from the black-box problem, where interpreting the model's internal operations is difficult. In particular, there is a risk of making erroneous predictions that violate physical laws under unknown machining conditions not included in the training data.
2.3. Physics-Informed Learning
Attempts to combine physical domain knowledge with AI models to improve the generalization performance and interpretability of data-driven models are gaining attention in the manufacturing field. The PINN framework proposed by Raissi et al. [5], which learns by combining data loss and partial differential equation (PDE) residuals, has become the foundation of Scientific Machine Learning (SciML).
Recently, there has been growing research into hybrid models within the field of metal cutting. Notably, a proposed approach enhances chatter detection performance by incorporating theoretical stability boundaries, derived from physical models, as auxiliary input features for deep learning models. Additionally, Rahimi et al. [7] presented a structure where a Kalman Filter-based physical model and a machine learning model run in parallel, with the physical model correcting the false positives of the data-driven model.
However, existing PINN studies in the manufacturing field mainly use physical information as auxiliary features at the input stage or as separate post-processing filters. The PRA-Net proposed in this study is differentiated in that it directly integrates physical laws (energy conservation) into the model's loss function to control the update of neural network weights. In particular, it possesses distinctiveness from existing studies as a self-supervised learning framework that uses physical thresholds as the sole supervision signal in situations where labels are nonexistent.
3. Methodology
The proposed framework consists of three key components: (1) Physics-Based Pseudo-Labeling, (2) The PRA-Net Architecture, and (3) The Physics-Informed Loss Function.
3.1. Physics-Based Pseudo-Labeling
Raw data obtained from industrial sites often lack tags indicating whether chatter occurred. To train the model without manual labeling, we define a self-supervised learning problem by focusing on the 'vibration divergence due to the regenerative effect,' which is a physical characteristic of chatter.
We utilize the Rolling Root Mean Square (RMS) value of the acceleration sensor signal A (t) as a proxy for kinetic energy. The energy Et over a specific window w (20 samples in this study) is calculated as in Equation (1).
\(\begin{align}E_{t}=\sqrt{\frac{1}{w} \sum_{i=t-w+1}^{t} A(i)^{2}}\end{align}\) (1)
We set a dynamic threshold Tphy based on the vibration distribution in a stable cutting state. Borrowing from Statistical Process Control (SPC) techniques, this is defined using the mean mu_stable and standard deviation σstable of the normal state, as shown in Equation (2).
Tphy = μstable + k · σstable (2)
Here, k is the Safety Factor. In this experiment, considering the statistical characteristics of the data, we set k = 4. This applies a stricter criterion than the 3-Sigma rule to capture only clear signs of anomalies. Finally, the pseudo-label ypseudo(t) is generated as defined in Equation (3).
\(\begin{align}y_{\text {pseudo }}(t)=\left\{\begin{array}{ll}1(\text { Chatter }), & \text { if } E_{t}>T_{\text {phy }} \\ 0(\text { Stable }), & \text { otherwise }\end{array}\right.\end{align}\) (3)
This approach induces the neural network to first learn "physically obvious" signs of anomalies and then extend its identification capability to ambiguous patterns on the boundary through the network's generalization ability. This can be viewed as a form of Weakly Supervised Learning.
3.2. PRA-Net Architecture
To precisely capture the precursor symptoms and occurrence patterns of chatter from complex time-series machining signals, we designed the PRA-Net (Physics-Regularized Attention Network). The overall architecture of the proposed model is illustrated in Figure 1. This network has a three-stage structure: feature extraction, time-series dynamic modeling, and importance allocation.

Fig. 1. Overview of PRA-Net Architecture (CNN-LSTM-Attention Structure)
Overview of PRA-Net Architecture (CNN-LSTM-Attention Structure)
1. Feature Extractor (1D-CNN): The input data consists of multivariate time series including RPM, Feedrate, Load, and Vibration (A1). The 1D Convolutional Neural Network (1D-CNN) acts as a filter that detects local frequency patterns and transients in the raw signal. Using 32 filters with a kernel size of 3, it converts the input signal into high-dimensional feature maps, and secures signal invariance and compresses data dimensions through ReLU activation functions and Max Pooling.
2. Time-Series Dynamic Modeling (Bi-LSTM): Chatter is not an instantaneous event but a process where vibration amplifies over time. To model this, we applied a Bidirectional LSTM (Bi-LSTM). The Bi-LSTM considers both past information (Forward) and future information (Backward) to infer the state at the current time step. This is effective for contextually identifying the onset of vibration growth and the stabilization point. The size of the hidden state was set to 64.
3. Attention Mechanism: In a long sequence of data (Sequence Length=50), not all time steps are equally important. The attention layer assigns weights to the output vectors of the Bi-LSTM, allowing the model to focus on high-energy intervals that have a decisive influence on chatter determination. The context vector c is calculated as expressed in Equation (4).
\(\begin{align}\alpha_{t}=\frac{\exp \left(e_{t}\right)}{\sum_{k=1}^{T} \exp \left(e_{k}\right)}, c=\sum_{t=1}^{T} \alpha_{t} h_{t}\end{align}\) (4)
Here, ht denotes the hidden state of the LST M at time step t, and αt represents the corresp onding attention weight.
3.3. Physics-Informed Loss Function
To prevent the model from merely learning statistical patterns of data and to enforce compliance with physical laws, we propose a composite loss function Ltotal, formulated as Equation (5).
Ltotal = LW-BCE + λ·Lphy (5)
3.3.1 Weighted Data Loss
To address the class imbalance problem, we use Weighted Binary Cross-Entropy loss. We assign a weight α > 1 to the minority class, Chatter (Positive Class), designed to impose a larger penalty when chatter is missed (False Negative). This weighted data loss Ldata is calculated as shown in Equation (6).
\(\begin{align}\begin{array}{l}L_{W-B C E}= \\ -\frac{1}{N} \sum_{i=1}^{N}\left[\alpha \cdot y_{i} \log \left(P\left(x_{i}\right)\right)+\left(1-y_{i}\right) \log \left(1-P\left(x_{i}\right)\right)\right]\end{array}\end{align}\) (6)
3.3.2. Physics Constraint Loss
This is the core of this study, introducing a hinge-type energy loss function. If the physical energy Ei of the input signal exceeds the threshold Tphy, the model's predicted probability P(xi) must converge to 1. This physics constraint loss Lphy is formally expressed in Equation (7).
\(\begin{align}\begin{array}{l}L_{p h y}= \\ \qquad \frac{1}{N} \sum_{i=1}^{N} \amalg\left(E_{i}>T_{p h y}\right) \cdot\left(1-P\left(x_{i}\right)\right)^{2}\end{array}\end{align}\) (7)
Here, I(.) is the indicator function. This term imposes a strong penalty proportional to the square of the error if the model incorrectly judges a high-energy signal as 'Stable' (P(x) ≈ 0). This forces the model parameters to update in a direction that does not allow physical violations during the optimization process.
3.4. Experimental Setup and Dataset Acqusition
To verify the validity of the proposed methodology, aluminum machining experiments were conducted in an actual CNC machining center. The tool used was a 16mm diameter end mill (1k233-1600-100-NB) from Sandvik, and a cutting-specific edge computing device was attached to the machine tool for data acquisition. The stated sampling rate of 12.5 Hz refers to the data logging frequency synchronized with the CNC controller, not the sensor's raw acquisition rate. High-frequency acceleration signals were pre-processed via edge computing to extract harmonic features, which were then down-sampled to align with the machine's control data.
The dataset was constructed by integrating distinct cutting regimes to encompass a wide spectrum of machining dynamics. It spans from high-speed operating conditions, characterized by aggressive material removal and increased susceptibility to dynamic instabilities such as chatter, to moderate-speed regimes that represent stable and transitional cutting states. This stratification allows the dataset to capture diverse physical behaviors inherent in the milling process.

Fig. 3. t-SNE Visualization of Latent Representations
The collected data includes Command RPM, Command Feedrate, Spindle Load, Actual Load (ActLoad), and Acceleration Sensor (A1) data. For the training stability of the model, all input variables were preprocessed using a Robust Scaler to be insensitive to outliers. The window size (Sequence Length) for time-series model input was set to 50.
3.5. Implementation Details
The PRA-Net model was implemented using the PyTorch framework. Training was conducted for a total of 150 epochs using AdamW (Adam with Weight Decay) as the optimization algorithm. To ensure training stability and prevent overfitting, the initial learning rate was set to 0.001, and a weight decay of 1e-4 was applied.
4. Results and Extended Analysis
4.1. Training Dynamics and Convergence
Fig. 2 illustrates the progression of the Total Loss and F1-Score throughout the training process. In the initial phase, the loss value starts high due to the strong penalty imposed by the physics constraint loss (Lphy). However, it decreases rapidly and stabilizes after approximately 50 epochs. This rapid convergence implies that the model effectively identifies feature representations that satisfy the physical energy constraints. Notably, the Validation F1-Score follows a similar upward trend to the Training F1-Score, suggesting that the model has secured generalized performance without overfitting to the physics-based pseudo-labels.
4.2. Classification Performance Evaluation
Although Ground Truth labels by humans were not provided during the training process, evaluation on the test set was performed based on labels generated based on physics to quantitatively evaluate the performance of the proposed self-supervised learning method.
Table 1 summarizes the final classification performance of PRA-Net. The overall accuracy reached 99.89%, and in particular, it achieved an F1-Score of 0.933 for the most critical minority class, 'Chatter'.
• Precision 0.93: 93% of the cases predicted as chatter by the model were actual physical danger zones. This means that false alarms causing unnecessary process interruptions are very few.
Table 1. Classification Performance of PRA-Net.

Recall 0.93: The model detected 93% of actual occurring chatter without missing it. This is a very important indicator from the perspective of equipment protection.
These results show that PRA-Net did not simply memorize the noise of the data but successfully generalized the physical rules (energy thresholds) implied by the pseudo-labels into the parameters inside the neural network.
4.3. Latent Space Visualization (t-SNE) Analysis
To verify whether the model learned physically meaningful features, latent feature vectors just before the last fully connected layer were projected into 2D using t-SNE (t-Distributed Stochastic Neighbor Embedding) for visualization.
This clear separation suggests that the model effectively extracted intrinsic features such as harmonic components or amplitude fluctuation patterns unique to chatter from the input signal. In particular, forming such a decision boundary solely with physical constraint loss without supervised learning proves that this framework can learn the inherent physical structure of data.
4.4. Deterministic Reliability and Probability Saturation
As a result of precise analysis of prediction results in the time domain, PRA-Net showed very unique and useful characteristics.
As seen in Fig 4 , in the chatter occurrence interval (energy surge interval), the model's predicted probability does not stay at ambiguous values (e.g., 0.6~0.8) but demonstrates a rapid saturation to 1.0 (Unity).

Fig. 4. Time-series over log of Ground Truth vs. Predict.
This is because the L_phy loss function acted as a 'Hard Constraint' rather than a 'Soft Regularizer'. During the optimization process, the model forces the output to 1.0 by adjusting weights to make the error (1 - P(x))2 zero in high-energy intervals.
From the perspective of industrial control systems, this step-like response is a huge advantage.
1. Deterministic Reliability: A probability of 1.0 means the model has 100% confidence based on physical laws.
2. Immediate Intervention: It provides a basis for issuing immediate spindle speed adjustment or emergency stop commands without a threshold tuning process for ambiguous probabilities.
3. Prevention of False Negatives: Since it is learned not to predict 'Stable' in physical danger zones, it functions as a safety device for equipment protection.
5. Conclusion
In this paper, we proposed a PRA-Net (Physics-Regularized Attention Network) that combines physical knowledge and deep learning to effectively detect chatter occurring in milling processes. To solve the chronic problems of data label shortage and class imbalance in manufacturing sites, we introduced a self-supervised pseudo-labeling technique based on physical energy laws.
Experimental results showed that the proposed method achieved a high detection performance of F1-Score 0.933 even without manual labeling data. In particular, by integrating physical constraints into the loss function, the model learned physically valid latent features (t-SNE results) and demonstrated probability saturation characteristics guaranteeing deterministic reliability in danger zones. This suggests that the proposed framework can be a robust and highly reliable solution for real-time state monitoring and control of smart manufacturing systems, going beyond simple anomaly detection algorithms.
In future research, we plan to further verify the generalization performance of the model through experiments on various tool geometries and workpiece materials, and proceed with linking with control logic that optimizes machining conditions in real-time based on detected chatter information.
References
- Y. Altintas, Manufacturing Automation: Metal Cutting Mechanics, Machine Tool Vibrations, and CNC Design, 2nd ed. Cambridge: Cambridge University Press, 2012.
- Tlustý, J., & Polacek, M, "The stability of machine tools against self-excited vibrations in machining," Prod. Eng. Res. Conf., ASME, Pittsburgh, 1963, pp. 465-474.
- M. Lamraoui, M. Thomas, M. El Badaoui, "Cyclostationarity approach for monitoring chatter and tool wear in high speed milling," Mechanical Systems and Signal Processing, vol. 44, issues 1-2, 201, pp. 177-198
- A. Gouarir et al., "In-process tool wear prediction system based on machine learning techniques and force analysis," Procedia CIRP, vol. 77, 2018, pp. 501-504. https://doi.org/10.1016/j.procir.2018.08.253
- M. Raissi, P. Perdikaris, and G. E. Karniadakis, "Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations," J. Comput. Phys., vol. 378, 2019, pp. 686-707. https://doi.org/10.1016/j.jcp.2018.10.045
- X. Li, W. Zhang, N.-X. Xu and Q. Ding, "Deep Learning-Based Machinery Fault Diagnostics With Domain Adaptation Across Sensors at Different Places," in IEEE Transactions on Industrial Electronics, vol. 67, no. 8, Aug. 2020, pp. 6785-6794. https://doi.org/10.1109/TIE.41
- M. H. Rahimi, H. N. Huynh, and Y. Altintas, "On-line chatter detection in milling with hybrid machine learning and physics-based model," CIRP J. Manuf. Sci. Technol., vol. 35, 2021, pp. 25-40. https://doi.org/10.1016/j.cirpj.2021.05.006