SearcharxivSearch

arXiv subjects

Zhengyu Tian

Publications and source records attributed to Zhengyu Tian.

6 recordsLinked to original sources

Attentions Under the Microscope: A Comparative Study of Resource Utilization for Variants of Self-Attention

As large language models (LLMs) and visual language models (VLMs) grow in scale and application, attention mechanisms have become a central computational bottleneck due to their high memory and time complexity. While many efficient attention variants have been proposed, there remains a lack of rigorous evaluation on their actual energy usage and hardware resource demands during training. In this work, we benchmark eight attention mechanisms in training GPT-2 architecture, measuring key metrics including training time, GPU memory usage, FLOPS, CPU usage, and power consumption. Our results reveal that attention mechanisms with optimized kernel implementations, including Flash Attention, Locality-Sensitive Hashing (LSH) Attention, and Multi-Head Latent Attention (MLA), achieve the best energy efficiency. We further show that lower GPU power alone does not guarantee reduced energy use, as training time plays an equally important role. Our study highlights the importance of energy-aware benchmarking in attention design and provides a practical insight for selecting resource-efficient mechanisms. All our codes are available at GitHub.

cs.LG

MSAT: Matrix stability analysis tool for shock-capturing schemes

The simulation of supersonic or hypersonic flows often suffers from numerical shock instabilities if the flow field contains strong shocks, limiting the further application of shock-capturing schemes. In this paper, we develop the unified matrix stability analysis method for schemes with three-point stencils and present MSAT, an open-source tool to quantitatively analyze the shock instability problem. Based on the finite-volume approach on the structured grid, MSAT can be employed to investigate the mechanism of the shock instability problem, evaluate the robustness of numerical schemes, and then help to develop robust schemes. Also, MSAT has the ability to analyze the practical simulation of supersonic or hypersonic flows, evaluate whether it will suffer from shock instabilities, and then assist in selecting appropriate numerical schemes accordingly. As a result, MSAT is a helpful tool that can investigate the shock instability problem and help to cure it.

math.NA

Numerical stability analysis of shock-capturing methods for strong shocks II: high-order finite-volume schemes

The shock instability problem commonly arises in flow simulations involving strong shocks, particularly when employing high-order schemes, limiting their applications in hypersonic flow simulations. This study focuses on exploring the numerical characteristics and underlying mechanisms of shock instabilities in fifth-order finite-volume WENO schemes. To this end, for the first time, we have established the matrix stability analysis method for the fifth-order scheme. By predicting the evolution of perturbation errors in the exponential growth stage, this method provides quantitative insights into the behavior of shock-capturing and helps elucidate the mechanisms that cause shock instabilities. Results reveal that even dissipative solvers also suffer from shock instabilities when the spatial accuracy is increased to fifth-order. Further investigation indicates that this is due to the excessively high spatial accuracy of the WENO scheme near the numerical shock structure. Moreover, the shock instability problem of fifth-order schemes is demonstrated to be a multidimensional coupling problem. To stably capture strong shocks, it is crucial to have sufficient dissipation on transverse faces and ensure at least two points within the numerical shock structure in the direction perpendicular to the shock. The source location of instability is also clarified by the matrix stability analysis method, revealing that the instability arises from the numerical shock structure. Additionally, stability analysis demonstrates that local characteristic decomposition helps mitigate shock instabilities in high-order schemes, although the instability still persists. These conclusions pave the way for a better understanding of the shock instability in fifth-order schemes and provide guidance for the development of more reliable high-order shock-capturing methods for compressible flows with high Mach numbers.

math.NA

Numerical stability analysis of shock-capturing methods for strong shocks I: second-order MUSCL schemes

Modern shock-capturing schemes often suffer from numerical shock anomalies if the flow field contains strong shocks, which may limit their further application in hypersonic flow computations. In the current study, we devote our efforts to exploring the primary numerical characteristics and the underlying mechanism of shock instability for second-order finite-volume schemes. To this end, we, for the first time, develop the matrix stability analysis method for the finite-volume MUSCL approach. Such a linearized analysis method allows to investigate the shock instability problem of the finite-volume shock-capturing schemes in a quantitative and efficient manner. Results of the stability analysis demonstrate that the shock stability of second-order scheme is strongly related to the Riemann solver, Mach number, limiter function, numerical shock structure, and computational grid. Unique stability characteristics associated with these factors for second-order methods are revealed quantitatively with the established method. Source location of instability is also clarified by the matrix stability analysis method. Results show that the shock instability originates from the numerical shock structure. Such conclusions pave the way to better understand the shock instability problem and may shed new light on developing more reliable shock-capturing methods for compressible flows with high Mach number.

math.NA

A unified construction of all-speed HLL-type schemes for hypersonic heating computations

In this paper, a unified framework to develop all-speed HLL-type schemes for hypersonic heating computations is constructed. Such a unified construction method combines two effective improving techniques: a shock robustness improvement and a low-Mach number fix. It is implemented by properly modifying the approximate solutions of the local Riemann problem in the HLL framework, resulting in two all-speed HLL-type schemes, namely ASHLLC and ASHLLEM solvers. Results from both numerical analysis and experiments demonstrate that the newly proposed schemes not only preserve desirable properties of their original versions, but are also able to provide accurate and robust solutions for complex flows ranging from low-Mach number incompressible to hypersonic compressible regimes. Thus, both the ASHLLC and ASHLLEM schemes can be used as reliable methods for hypersonic heating computations.

cs.CE

Further studies on numerical instabilities of Godunov-type schemes for strong shocks

In this paper, continuous research is undertaken to explore the underlying mechanism of numerical shock instabilities of Godunov-type schemes for strong shocks. By conducting dissipation analysis of Godunov-type schemes and a sequence of numerical experiments, we are able to clarify that the instability may be attributed to insufficient entropy production inside the numerical shock structure. As a result, a general entropy-control technique for improving the robustness of various Godunov-type schemes at strong shocks is developed. It plays a part in guaranteeing that enough entropy is produced inside the numerical shock structure. Furthermore, such a modified approach does not introduce any additional numerical dissipation on linear degenerate waves to suppress the shock instability. Numerical results that are obtained for various test cases indicate that the proposed methods have a good performance in terms of accuracy and robustness.

physics.comp-ph