To address spindle thermal error in precision machining, this study proposes a hybrid modeling method. It combines a physical model for linear deformation with a GAT-LSTM network. Experiments show the hybrid model achieved RMSE/MAE of 4.6/4.0 µm under full training (12 conditions), 5.5/4.9 µm under 3 training condition and 4.8/4.3 µm under 1 training condition, substantially reducing the data requirements for thermal error modeling. The compensation experiment conducted using a high real-time surrogate-model-based architecture reduced thermal error by 78% (from 54 µm to 12 µm), demonstrating high precision and minimal data requirements suitable for real-time applications.