SearcharxivSearch

arXiv subjects

Yufeng Lin

Publications and source records attributed to Yufeng Lin.

At least 19 recordsLinked to original sources

Who Should Own the Expert Cache? Kernel-Managed Tiering for Trillion-Parameter MoE Inference

Mixture-of-experts models whose expert pools exceed DRAM capacity require a weight-residency tier. Existing systems manage it in user space with expert-granular placement, frequency-based admission, and explicit pinning. We evaluate whether the operating system page cache can instead serve as the expert tier, using router traces from three MoE models with 128 to 896 experts per layer; the trillion-parameter production model's traces are replayed natively against its full 1.45 TB expert pool on GH200 hardware. Capacity is enforced by three independent mechanisms. Iteration time varies smoothly with cache size (run-to-run spread <=4%), and device traffic follows the same trend. Under severe pressure the outcome depends on reclaim: device traffic rises above miss demand only when MGLRU, the tested kernels' default, is combined with balloon-style, mostly mlocked memory, a result reproduced on two machines; cgroup limits and mem= boots show no such behavior, so balloon-based studies can overstate low-capacity device traffic by about 2x. At equal enforced memory, kernel recency serves essentially the same demand as an oracle static-frequency policy computed from the replay trace. In the pread-based replay the oracle-pinned arena stays 1.09-1.11x faster, a gap that is the cost of the page-cache hit and reclaim path, but its static table degrades under domain shift while recency remains stable. At 64.7% measured recall, router lookahead changes median time by 0.3% when delivered as kernel readahead advice; perfect one-layer advice gains 5.0% through the same interface and nothing through blocking reads. End-to-end at ample capacity, enabling page-cache admission speeds steady decode by 1.09-1.10x in a production CUDA engine with token-identical outputs. These measurements favor kernel-managed eviction, with model knowledge applied to admission and predictive advice.

cs.OS

The Ingestion Tax: Adopting File-Backed Weights in Tensor Frameworks

Open-weight models can occupy a middle capacity regime: active weights fit in DRAM as cached file pages, but a second framework-owned copy does not fit or must be refilled as layers run, so low-batch decode rereads the weights every token. On integrated and coherent-memory systems those file pages are already GPU-readable, yet ordinary loading paths copy them into framework allocations before use. We call this copy the ingestion tax. We present file-backed weight adoption: a framework-independent producer maps each tensor with MAP_SHARED, wraps the pages as a no-copy GPU buffer, and exports a DLPack capsule that PyTorch or MLX imports as ordinary storage. Zero-copy import alone is insufficient: the implementation must also keep activations accelerator-resident and establish ordering on the GPU; an adopter that omits both runs a dense decode stage 2.3x slower than stock in the live system. With both in place, adoption removes the tax: the public route reaches 516 GB/s versus 53-82 for the default constructors, matches the identical kernel over resident storage ([-0.66%, +0.48%], paired), and is within 1.3% of a resident control on a matched Qwen2.5-72B (7.14 vs. 7.23 tok/s). At the same throughput, the weights remain clean, shared, evictable file pages: N processes decode from one mapped copy where resident loading creates N copies (at capacity, 5.5 vs. 0.08 tok/s), and a 65 GB checkpoint cuts time to first token by 6.4x versus stock loading. In Kimi K3, a 2.8T-parameter MoE, the dense int8 spine stage falls from 2.62 to 0.35 s per token (7.5x; 3.8x from storage alone). The same mechanism improves llama.cpp by 1.21x at half the footprint on an AMD APU, falls inside the 5% selection band of overlapped streaming on a capacity-exceeding GH200 workload, and is 39x slower across PCIe. The deployment rule follows memory topology: adopt file pages only where the GPU can already read them.

cs.OS

Content Hidden Behind Execution: Analyzing Public Scratch Projects at Runtime

Public Scratch projects are reused in computing education as classroom examples, remix sources, open-exploration materials, and research data. Curation often begins with titles, thumbnails, descriptions, tags, and remix links, but Scratch projects are executable learning artifacts. Content affecting age appropriateness can appear only after execution, gameplay progression, a failure state, user interaction, costume switching, audio playback, or a hidden event trigger. We study "runtime-revealed sensitive content" as a computing education curation challenge: educators and researchers need runtime evidence about what students may encounter when Scratch projects are used in these settings. We introduce a runtime-aware annotation scheme that separates content category, risk level, evidence channel, reveal mechanism, and annotation confidence. Using this scheme, we conducted an audit of 500 public Scratch projects sampled from curated candidates, taxonomy-guided keyword search, and follow-up exploration of project clusters surfaced during review. In this audit, 467 of 500 projects (93%) required runtime exploration beyond static metadata to surface the safety-relevant signal; 387 (77%) required interaction, gameplay progression, failure states, or hidden-asset and code inspection. As a targeted classroom and research curation audit, the study characterizes reveal mechanisms in a selected corpus rather than estimating platform-wide prevalence or making platform-level safety claims. The results show metadata-only screening leaves key evidence unresolved in executable youth media. By separating content type, severity, evidence location, and reveal pathway, this work supports classroom project selection, student exploration practices, dataset construction, and educator-facing screening tools for block-based programming communities.

cs.CY

ScratchWorld: Evaluating If World Models Compute Executable Consequences

World-model evaluations often score a predicted future by overlap with a target state or observation. In sparse-change worlds, this can turn copied persistent state into apparent accuracy. We introduce ScratchWorld, an offline diagnostic benchmark that treats Scratch projects as executable worlds and uses a pinned Scratch VM to produce replay-verified transitions, hidden variables, causal traces, and counterfactual outcomes. ScratchWorld evaluates next-state prediction, long-horizon tracking, causal event attribution, and counterfactual prediction; each replay-verified target can be presented under raw-program, structured-state, natural-language, or rendered input modalities, and our experiments use the structured-state condition. Its primary state metric is value-aware changed-field $F_1$, which gives credit only for the changed field and its executed value. In a 659-example release, seven prompted language/reasoning models reach at most 13.8% value-aware changed-field $F_1$ in a state-only partial-observation stress test. A same-instance copy diagnostic makes the overlap confound concrete: copying the input state reaches 98.0% implied full-state field accuracy and 0.0% changed-field $F_1$, with the largest inflation on real projects. Auxiliary diagnostics separate hidden-state rollout drift, intervention sensitivity, causal attribution, and perturbation robustness. Across these settings, models often react to actions or interventions without following the executable rule that determines the changed value.

cs.SE

ORGEval: Graph-Theoretic Evaluation of LLMs in Optimization Modeling

Formulating optimization problems for industrial applications demands significant manual effort and domain expertise. While Large Language Models (LLMs) show promise in automating this process, evaluating their performance remains difficult due to the absence of robust metrics. Existing solver-based approaches often face inconsistency, infeasibility issues, and high computational costs. To address these issues, we propose ORGEval, a graph-theoretic evaluation framework for assessing LLMs' capabilities in formulating linear and mixed-integer linear programs. ORGEval represents optimization models as graphs, reducing equivalence detection to graph isomorphism testing. We identify and prove a sufficient condition, when the tested graphs are symmetric decomposable (SD), under which the Weisfeiler-Lehman (WL) test is guaranteed to correctly detect isomorphism. Building on this, ORGEval integrates a tailored variant of the WL-test with an SD detection algorithm to evaluate model equivalence. By focusing on structural equivalence rather than instance-level configurations, ORGEval is robust to numerical variations. Experimental results show that our method can successfully detect model equivalence and produce 100\% consistent results across random parameter configurations, while significantly outperforming solver-based methods in runtime, especially on difficult problems. Leveraging ORGEval, we construct the Bench4Opt dataset and benchmark state-of-the-art LLMs on optimization modeling. Our results reveal that although optimization modeling remains challenging for all LLMs, DeepSeek-V3 and Claude-Opus-4 achieve the highest accuracies under direct prompting, outperforming even leading reasoning models.

cs.LG

Dynamos driven by top-heavy double-diffusive convection in the strong-field regime

The magnetic fields of terrestrial planets are generated in their liquid cores through dynamo action driven by thermal and compositional convection. The coexistence of these two buoyancy sources gives rise to double-diffusive convection (DDC) due to the contrast between thermal and compositional diffusivities. However, most dynamo simulations adopt the co-density model, where the two diffusivities are assumed to be equal. In this study, we performed both hydrodynamic and dynamo simulations of top-heavy DDC in a rotating spherical shell with the Lewis number $Le=100$, and compared them with corresponding co-density models. In the hydrodynamic regime, the convective flow morphology is strongly influenced by the nature of the buoyancy sources. However, our dynamo simulations in the strong-field regime demonstrate that the co-density and DDC models yield qualitatively similar magnetic fields at comparable magnetic Reynolds numbers, albeit with some differences in detail. These numerical models further justify the use of the co-density model in planetary dynamo simulations. Finally, we demonstrate that dynamo models based on DDC and co-density produce similar magnetic fields and secular variations at the core-mantle boundary. This suggests that it may not be possible to distinguish the buoyancy sources responsible for planetary dynamos based solely on magnetic field observations.

astro-ph.EP

Scaling behaviour of rotating convection in a spherical shell with different Prandtl numbers

Rayleigh-Benard convection in a rotating spherical shell provides a simplified model for convective dynamics of planetary and stellar interiors. In this study, we build more than 200 numerical models of rotating convection in a spherical shell over a wide range of $\Pran$ ($10^{-2}\le\Pran\le10^2$). As increasing the Rayleigh number $Ra$, we characterise four different flow regimes, starting from the linear onset to multiple modes, then transiting to the geostrophic turbulence and eventually approaching the weakly rotating regime. In the multiple modes regime, we show evidence of triadic resonances in numerical models with different $\Pran$, which may provide a generic mechanism for the transition from laminar to turbulence in rotating convection. We analyse scaling behaviours of the heat transfer and convective flow speeds in numerical simulations, paying particular attention to the $\Pran$-dependence. We find that the so-called diffusion-free scaling for the heat transfer cannot reconcile all numerical models with different $\Pran$ in the geostrophic turbulence regime. However, the characteristic flow speeds at different $\Pran$ roughly follow a unified scaling that can be described by VAC force balances, though the scaling tends to approach the CIA force balance at low $\Pran$. Both scaling behaviours and transition behaviours suggest that the heat transfer is controlled by the boundary layers while the convective flow speeds are mainly determined by the force balance in the bulk for cases with $\Pran>1$, which is in line with recent experimental results with moderate to high $\Pran$. For cases with $\Pran \le 1$, both the heat transfer and convective velocities are approaching the inviscid dynamics in the bulk.

physics.flu-dyn

Ocean Tides on Asynchronously Rotating Planets Orbiting Low-mass Stars

Planets in the liquid-water habitable zone of low-mass stars experience large tidal forces, $10^3$ to $10^4$ times those on Earth, due to the small distance between the habitable zone and the host stars. Therefore, interior solid tides, ocean tides and atmospheric tides on these planets could be much stronger than that on Earth, but rare work has been done to explicitly simulate the ocean tides. Here, for the first time, we perform global ocean tide simulations and show that ocean tides on asynchronously rotating planets with large eccentricities can reach $\mathcal{O}(1000)\,\mathrm{m}$ in height and $\mathcal{O}(10)\,\mathrm{m\,s^{-1}}$ in flow speed. Interactions between tide and bottom topography can induce large energy dissipation, $\sim\mathcal{O}(100)\,\mathrm{W\,m^{-2}}$ in global mean. This tidal energy dissipation can strongly accelerate orbital evolution by 1-2 orders of magnitude. However, for planets with small eccentricities, the ocean tides are much weaker but still comparable to that on modern Earth. Our results suggest that ocean tides on eccentric planets orbiting low-mass stars are orders of magnitude more powerful than those on Earth and can dramatically influence surface geography and orbital evolution.

astro-ph.EP

Numerical Simulations of Magnetic Effects on Zonal Flows in Giant Planets

Jupiter and Saturn exhibit alternating east-west jet streams as seen from surface. The origin of these zonal flows has been debated for decades. The high-precision gravity measurements by Juno mission and the grand finale of Cassini mission have revealed that the zonal flows observed at the surface may extend several thousand kilometres deep and stop around the transition region from molecular to metallic hydrogen, suggesting the magnetic braking effect on zonal flows. In this study, we perform a set of magnetohydrodynamic simulations in a spherical shell with radially variable electrical conductivity to investigate the interaction between magnetic fields and zonal flows. A key feature of our numerical models is that we impose a background dipole magnetic field on the anelastic rotating convection. By varying the strength of the imposed magnetic field and the vigor of convection, we investigate how the magnetic field interacts with the convective motions and the convection-driven zonal flows. Our simulations reveal that the magnetic field tends to destroy zonal flows in the metallic hydrogen and suppress zonal flows in the molecular envelope, while the magnetic field may enhance the radial convective motions. We extract a quantitative relation between the magnetic field strength and the amplitude of zonal flows at the surface through our simulations, which roughly matches the observed magnetic field and zonal wind speed of Jupiter and Saturn. This discovery provides support from a new perspective for the scenario of deep convection-driven zonal winds which are confined to the molecular hydrogen layers in giant planets.

astro-ph.EP

Weakening the effect of boundaries: `diffusion-free' boundary conditions as a `do least harm' alternative to Neumann

In this note, we discuss a poorly known alternative boundary condition to the usual Neumann or `stress-free' boundary condition typically used to weaken boundary layers when diffusion is present but very small. These `diffusion-free' boundary conditions were first developed (as far as the authors know) in 1995 (Sureshkumar & Beris, J. Non-Newtonian Fluid Mech., vol 60, 53-80, 1995) in viscoelastic flow modelling but are worthy of general consideration in other research areas. To illustrate their use, we solve two simple ODE problems and then treat a PDE problem - the inertial wave eigenvalue problem in a rotating cylinder, sphere and spherical shell for small but non-zero Ekman number $E$. Where inviscid inertial waves exist (cylinder and sphere), the viscous flows in the Ekman boundary layer are $O(E^{1/2})$ weaker than for the corresponding stress-free layer and fully $O(E)$ weaker than in a non-slip layer. These diffusion-free boundary conditions can also be used with hyperdiffusion and provide a systematic way to generate as many further boundary conditions as required. The weakening effect of this boundary condition could allow precious numerical resources to focus on other areas of the flow and thereby make smaller, more realistic values of diffusion accessible to simulations.

physics.flu-dyn

Dynamical tides in Jupiter and the role of interior structure

Context. The Juno spacecraft has obtained highly accurate tidal Love numbers, which provide important constraints on the tidal response and interior structure of Jupiter. Aims. In order to exploit these observations, it is necessary to develop an approach for accurately calculating the tidal response of Jupiter for a given interior model and to investigate the role of interior structure. Methods. We directly solve the linearized tidal equations of a compressible, self-gravitating, rotating and viscous fluid body using a pseudo-spectral method. The Coriolis force is fully taken into account but the centrifugal effect is neglected. We can simultaneously obtain the real and imaginary parts of the tidal Love numbers for a given planetary interior model. Results. We calculate the tidal responses for three simple interior models of Jupiter which may contain a compact rigid core or an extended dilute core. All of models we consider can explain the fractional correction $Δk_{22}\approx -4\%$ due to dynamical tides, but all have difficulties to reconcile the observed $Δk_{42}\approx -11\%$ for the high-degree tidal Love number. We show that the Coriolis force significantly modifies gravity modes in an extended dilute core at the tidal frequency relevant to the Galilean satellites. We demonstrate that a thin stable layer in the outer region, if exists, would also influence the tidal responses of Jupiter.

astro-ph.EP

Learning Trustworthy Model from Noisy Labels based on Rough Set for Surface Defect Detection

In the surface defect detection, there are some suspicious regions that cannot be uniquely classified as abnormal or normal. The annotating of suspicious regions is easily affected by factors such as workers' emotional fluctuations and judgment standard, resulting in noisy labels, which in turn leads to missing and false detections, and ultimately leads to inconsistent judgments of product quality. Unlike the usual noisy labels, the ones used for surface defect detection appear to be inconsistent rather than mislabeled. The noise occurs in almost every label and is difficult to correct or evaluate. In this paper, we proposed a framework that learns trustworthy models from noisy labels for surface defect defection. At first, to avoid the negative impact of noisy labels on the model, we represent the suspicious regions with consistent and precise elements at the pixel-level and redesign the loss function. Secondly, without changing network structure and adding any extra labels, pluggable spatially correlated Bayesian module is proposed. Finally, the defect discrimination confidence is proposed to measure the uncertainty, with which anomalies can be identified as defects. Our results indicate not only the effectiveness of the proposed method in learning from noisy labels, but also robustness and real-time performance.

cs.CV

Resonant tidal responses in rotating fluid bodies: global modes hidden beneath localized wave beams

In rotating stars and planets, excitation of inertial waves in convective envelopes provides an important channel for tidal dissipation, but the dissipation rate due to inertial waves depends erratically on the tidal frequency. Tidal dissipation is significantly enhanced at some frequencies, suggesting possible resonances between the tidal forcing and some eigenmodes. However, the nature of these resonances remains enigmatic owing to the singularity of the eigenvalue problem of inertial waves, and the resonances are often mistakenly attributed to wave attractors in the literature. In this letter, we reveal that resonant tidal responses correspond to inertial modes with large-scale flows hidden beneath localized wave beams. Strong couplings between the tidal forcing and the hidden large-scale flows intensify the localized wave beams emanating from the critical latitudes, leading to enhanced tidal dissipation. This study resolves a long-standing puzzle regarding the frequency-dependence of tidal dissipation due to inertial waves in convective envelopes.

physics.flu-dyn

Large-scale vortices and zonal flows in spherical rotating convection

Motivated by understanding the dynamics of stellar and planetary interiors, we have performed a set of direct numerical simulations of Boussinesq convection in a rotating full sphere. The domain is internally heated with fixed temperature and stress-free boundary conditions, but fixed heat flux and no-slip boundary conditions are also briefly considered. We particularly focus on the large-scale coherent structures and the mean zonal flows that can develop in the system. At Prandtl number of unity, as the thermal forcing (measured by the Rayleigh number) is increased above the value for the onset of convection, we find a relaxation oscillation regime, followed by a geostrophic turbulence regime. Beyond this we see for the first time the existence of large-scale coherent vortices that form on the rotation axis. All regime boundaries are well described by critical values of the convective Rossby number $Ro_c$, with transitions from oscillatory to geostrophic turbulence, and then to the large-scale vortex regime at values $Ro_c\approx 0.2$ and $Ro_c\approx 1.5$, respectively. The zonal flow is controlled by the convective Rossby number and changes its direction when the flow transitions from the geostrophic turbulence regime to the large-scale vortex regime. While the non-zonal flow speed and heat transfer can be described by the so-called inertial scaling in the geostrophic turbulence regime, the formation of large-scale vortices appears to reduce both the non-zonal flow speed and the efficiency of convective heat transfer.

physics.flu-dyn

Triadic resonances driven by thermal convection in a rotating sphere

We report for the first time on triadic resonances in a rotating convection system. Using direct numerical simulations, we find that convective modes in a rotating spherical fluid can excite a pair of inertial modes whose frequencies and wavenumbers match the triadic resonance conditions. Depending on the structures of the convective modes, triadic resonances can lead to the growth of either a pair of modes with lower frequencies and wavenumbers, or a pair of modes with higher frequencies and wavenumbers, providing a possible mechanism for the bi-directional energy cascade. Increased thermal forcing leads to fully developed turbulence, which also exhibits wave-like motions, and is reminiscent of the energy spectrum of inertial wave turbulence. Our results suggest that the interaction of inertial waves plays an important role in rotating convection, which is of great importance in understanding the dynamics of planetary and stellar interiors.

physics.flu-dyn

Libration-driven inertial waves and mean zonal flows in spherical shells

Several planetary bodies in our solar system undergo a forced libration owing to gravitational interactions with their orbital companions, leading to complex fluid motions in their metallic liquid cores or subsurface oceans. In this study, we numerically investigate flows in longitudinally librating spherical shells. We focus on the Ekman number dependencies of several shear layers when the libration frequency is less than twice of the rotation frequency and the libration amplitude is small. Time-dependent flows mainly consist of inertial waves excited at the critical latitudes due to the Ekman pumping singularities, forming conical shear layers. In particular, previous theoretical studies have proposed different scalings for the conical shear layers spawned from the critical latitudes at the inner boundary. Our numerical results favor the velocity amplitude scaling $\mathrm{O}(\varepsilon E^{1/12})$ predicted by Le Dizès \& Le Bars (2017) over the scaling $\mathrm{O}(\varepsilon E^{1/6})$ initially proposed by Kerswell (1995), though the Ekman numbers in our calculations are not sufficiently small to pin down this scaling. Non-linear interactions in the boundary layers drive a mean zonal flow with several geostrophic shears. Our numerical results show that geostrophic shears associated with the critical latitudes at the inner and outer boundaries exhibit the same scalings, i.e. an amplitude of $\mathrm{O}(\varepsilon^2 E^{-1/10})$ over a width of $\mathrm{O}(E^{1/5})$. Apart from the geostrophic shear associated with the critical latitude, our numerical results show that the reflection of inertial waves can induce a geostrophic shear with an amplitude of $\mathrm{O}(\varepsilon^2 E^{-1/6})$ over a width of $\mathrm{O}(E^{1/3})$.

physics.flu-dyn

Federated Deep Reinforcement Learning

In deep reinforcement learning, building policies of high-quality is challenging when the feature space of states is small and the training data is limited. Despite the success of previous transfer learning approaches in deep reinforcement learning, directly transferring data or models from an agent to another agent is often not allowed due to the privacy of data and/or models in many privacy-aware applications. In this paper, we propose a novel deep reinforcement learning framework to federatively build models of high-quality for agents with consideration of their privacies, namely Federated deep Reinforcement Learning (FedRL). To protect the privacy of data and models, we exploit Gausian differentials on the information shared with each other when updating their local models. In the experiment, we evaluate our FedRL framework in two diverse domains, Grid-world and Text2Action domains, by comparing to various baselines.

cs.LG

Ohmic dissipation in the Earth's outer core resulting from the free inner core nutation

The diurnal tidal forces can excite a normal mode of the Earth's core, the free inner core nutation (FICN), which is characterized by a tilt of the rotation axis of the inner core with respect to the rotation axis of the outer core. The differential rotation between the inner core and the outer core induces fluid motions in the outer core and gives rise to Ohmic dissipation in the presence of the Earth's internal magnetic field. Nutation measurements can reflect such dissipation if it is sufficiently strong and thus can provide insights into the properties and dynamics of the Earth's core. In this study we perform a set of numerical calculations of the linear perturbations in the outer core induced by the FICN at very low Ekman numbers (as small as $10^{-11}$). Our numerical results show that the back-reaction of the magnetic field notably alters the structure and length scale of the perturbations induced by the FICN, and thus influences the Ohmic dissipation resulting from the perturbations. When the Ekman number is sufficiently small, Ohmic dissipation tends to be insensitive to the fluid viscosity and to the magnetic diffusivity, which allows us to estimate the Ohmic dissipation associated with the FICN without relying on an extrapolation. In contrast to the results of Buffett (2010b), the estimated Ohmic dissipation based on our numerical calculations is too weak to account for the observed damping of the FICN mode. This also implies that nutation measurements cannot provide effective constraints on the strength of the magnetic field inside the Earth's outer core.

physics.geo-ph