Nonlinear Function Fitting and Prediction Using Newton-CG Optimization and Transformer Architecture

Enhancing Accuracy and Efficiency in High-Dimensional Nonlinear Predictions

Abstract

This study proposes a nonlinear function-fitting prediction model combining the Newton-CG optimization algorithm with the Transformer architecture to address the limited accuracy and generalization of high-dimensional nonlinear data. Traditional methods often struggle with slow convergence and overfitting when dealing with complex nonlinear relationships. In this paper, the Transformer's multi-head self-attention mechanism is used to capture long-term dependencies in the data, and the Newton-CG method is used to accelerate parameter optimization during model training, thereby significantly improving fitting accuracy and computational efficiency. In the experimental part, three typical nonlinear functions and two public high-dimensional data sets are selected for verification, and the model's average test-set fitting error is reduced to 0.023, which is about 71.5% and 68.2% higher than those of the traditional LSTM and BP network methods. At the same time, the introduction of the Newton-CG method reduces the number of training iterations by about 40% and the average convergence time by 60%. The results show that the proposed model achieves high accuracy and strong generalization in nonlinear function fitting, providing an effective solution to the prediction problem in complex systems.

Authors

  • Fang Gao School of Intelligent Construction, Henan institute of economics and trade

DOI:

https://doi.org/10.31449/inf.v50i13.13648

Downloads

Published

05/18/2026

How to Cite

Gao, F. (2026). Nonlinear Function Fitting and Prediction Using Newton-CG Optimization and Transformer Architecture: Enhancing Accuracy and Efficiency in High-Dimensional Nonlinear Predictions. Informatica, 50(13). https://doi.org/10.31449/inf.v50i13.13648