SearcharxivSearch

arXiv subjects

Jack King

Publications and source records attributed to Jack King.

4 recordsLinked to original sources

Representational Curvature Modulates Behavioral Uncertainty in Large Language Models

In autoregressive large language models (LLMs), temporal straightening offers an account of how the next-token prediction objective shapes representations. Models learn to progressively straighten the representational trajectory of input sequences across layers, potentially facilitating next-token prediction via linear extrapolation. However, a direct link between this trajectory and token-level behavior has been missing. We provide such a link by relating contextual curvature-a geometric measure of how sharply the representational trajectory bends over recent context-to next-token entropy. Across two models (GPT-2 XL and Pythia-2.8B), contextual curvature is correlated with entropy, and this relationship emerges during training. Perturbation experiments reveal selective dependence: manipulating curvature through trajectory-aligned interventions reliably modulates entropy, while geometrically misaligned perturbations have no effect. Finally, regularizing representations to be straighter during training modestly reduces token-level entropy without degrading validation loss. These results identify trajectory curvature as a task-aligned representational feature that influences behavioral uncertainty in LLMs.

cs.AI

High-order simulations of isothermal flows using the local anisotropic basis function method (LABFM)

Mesh-free methods have significant potential for simulations of flows in complex geometries, with the difficulties of domain discretisation greatly reduced. However, many mesh-free methods are limited to low order accuracy. In order to compete with conventional mesh-based methods, high order accuracy is essential. The Local Anisotropic Basis Function Method (LABFM) is a mesh-free method introduced in King et al., J. Comput. Phys. 415:109549 (2020), which enables the construction of highly accurate difference operators on disordered node discretisations. Here, we introduce a number of developments to LABFM, in the areas of basis function construction, stencil optimisation, stabilisation, variable resolution, and high order boundary conditions. With these developments, direct numerical simulations of the Navier Stokes equations are possible at extremely high order (up to 10th order in characteristic node spacing internally). We numerically solve the isothermal compressible Navier Stokes equations for a range of geometries: periodic and channel flows, flows past a cylinder, and porous media. Excellent agreement is seen with analytical solutions, published numerical results (using a spectral element method), and experiments. The potential of the method for direct numerical simulations in complex geometries is demonstrated with simulations of subsonic and transonic flows through an inhomogeneous porous media at pore Reynolds numbers up to Re=968.

physics.flu-dyn

High Weissenberg number simulations with incompressible Smoothed Particle Hydrodynamics and the log-conformation formulation

Viscoelastic flows occur widely, and numerical simulations of them are important for a range of industrial applications. Simulations of viscoelastic flows are more challenging than their Newtonian counterparts due to the presence of exponential gradients in polymeric stress fields, which can lead to catastrophic instabilities if not carefully handled. A key development to overcome this issue is the log-conformation formulation, which has been applied to a range of numerical methods, but not previously applied to Smoothed Particle Hydrodynamics (SPH). Here we present a 2D incompressible SPH algorithm for viscoelastic flows which, for the first time, incorporates a log-conformation formulation with an elasto-viscous stress splitting (EVSS) technique. The resulting scheme enables simulations of flows at high Weissenberg numbers (accurate up to Wi=85 for Poiseuille flow). The method is robust, and able to handle both internal and free-surface flows, and a range of linear and non-linear constitutive models. Several test cases are considerd included flow past a periodic array of cylinders and jet buckling. This presents a significant step change in capabilties compared to previous SPH algorithms for viscoelastic flows, and has the potential to simulate a wide range of new and challenging applications.

physics.flu-dyn

High order difference schemes using the Local Anisotropic Basis Function Method

Mesh-free methods have significant potential for simulations in complex geometries, as the time consuming process of mesh-generation is avoided. Smoothed Particle Hydrodynamics (SPH) is the most widely used mesh-free method, but suffers from a lack of consistency. High order, consistent, and local (using compact computational stencils) mesh-free methods are particularly desirable. Here we present a novel framework for generating local high order difference operators for arbitrary node distributions, referred to as the Local Anisotropic Basis Function Method (LABFM). Weights are constructed from linear sums of anisotropic basis functions (ABFs), chosen to ensure exact reproduction of polynomial fields up to a given order. The ABFs are based on a fundamental Radial Basis Function (RBF), and the choice of fundamental RBF has small effect on accuracy, but influences stability. LABFM is able to generate high order difference operators with compact computational stencils (4th order with 25 nodes, 8th order with 60 nodes in two dimensions). At domain boundaries (with incomplete support) LABFM automatically provides one-sided differences of the same order as the internal scheme, up to 4th order. We use the method to solve elliptic, parabolic and mixed hyperbolic-parabolic PDEs, showing up to 8th order convergence. The inclusion of hyperviscosity is straightforward, and can effectively provide stability when solving hyperbolic problems. LABFM is a promising new mesh-free method for the numerical solution of PDEs in complex geometries. The method is highly scalable, and for Eulerian schemes, the computational efficiency is competitive with RBF-FD for a given accuracy. A particularly attractive feature is that in the low order limit, LABFM collapses to SPH, and there is potential for Arbitrary Lagrangian-Eulerian schemes with natural adaptivity of resolution and accuracy.

physics.comp-ph