arXiv ScienceSearch

arXiv subjects

Matthew Ho

Publications and source records attributed to Matthew Ho.

At least 19 recordsLinked to original sources

Don't Cut Corners: How Training Outside the Prior Makes Simulation-Based Inference More Robust

Large astrophysical simulation campaigns often generate training data by sampling parameters across a Uniform prior box. Due to the proposal's sharp edge, neural posterior estimators struggle to learn accurate approximations near the boundaries. We propose Tailed-Uniform, a family of hybrid proposal distributions for sampling training simulations for robust simulation-based inference. By padding the original hard-truncated training box with decaying tails, Tailed-Uniform-trained networks yield more accurate posteriors near and beyond the edges. We demonstrate these improvements on a family of tail shapes, including a widened Uniform box as a control. Our results suggest that additional simulations near the prior boundary better constrain the networks as it approaches the edge of the training box, even for Uniform assumed priors. We show these advantages on a toy problem and cosmological parameter inference from the matter power spectrum. These benefits increase in high dimensions, where boundaries dominate parameter space volume.

astro-ph.IM

DegenDetector: Symbolic Recovery of Parameter Degeneracies in Bayesian Posteriors

We introduce DegenDetector, a framework for identifying and characterizing parameter degeneracies in posterior distributions as closed-form symbolic equations. By combining mutual information screening with alternating symbolic regression, we facilitate automated and interpretable identification of degenerate relationships without domain-specific input. While standard tools such as corner plots can indicate that correlations exist, they do not reveal the underlying functional form. DegenDetector fills this gap by expressing multi-parameter degeneracies as closed-form equations, providing interpretable structure that scales to high-order parameter spaces.

astro-ph.IM

Cluster Mass Inference from Galaxy Kinematics

The masses of galaxy clusters carry cosmological and astrophysical information. We develop a simulation-based inference pipeline to infer cluster masses from full projected phase-space information of member and interloper galaxies. Our method combines a permutation-invariant Deep Sets architecture with neural posterior estimation using normalizing flows, enabling the recovery of expressive posterior distributions. We train the model to predict residual corrections to the classical $M$--$\sigma$ relation, thus explicitly isolating information beyond velocity dispersion. Using the Uchuu-UniverseMachine simulation, we evaluate the method under both idealized (interloper-free) and realistic (cylindrical) observational setups. In the idealized case, our model reduces the scatter in mass estimates to as low as $\sim 0.1$ dex, representing a twofold improvement over the traditional $M$--$\sigma$ relation. In the cylindrical setup, we achieve comparable performance at the high-mass end ($> 10^{14.5}\,M_\odot/h$), demonstrating robustness against interloper contamination. We demonstrate that set-based simulation-driven inference provides a powerful and flexible framework for galaxy cluster mass estimation, enabling improved accuracy and reliable uncertainty characterization for upcoming large-scale surveys. Our model saturates the kinematic information content and thus suggests a baseline for future studies.

astro-ph.CO

Auto-Configuring Scientific Simulators with Lightweight Coding-Agent Adapters

Configuring an advanced scientific simulator, translating a modeling goal into a valid, runnable input deck, is a persistent bottleneck that costs domain scientists hours to days. Input decks are executable interfaces: simulator-specific vocabulary, cross-file references, schema constraints, and validation rules must align before a simulation can run. We show that this bottleneck can be substantially reduced with a lightweight adapter around an off-the-shelf coding agent, rather than a bespoke simulator agent. Coding agents already navigate files, edit code, run commands, and repair outputs; what they lack is the simulator's executable contract, and rebuilding the agent loop risks discarding harness-calibrated tool-use and self-correction behavior. We introduce SIGA, a coding-agent adapter that supplies this contract through retrieval, procedural memory, agent-callable validation, and validation-gated termination while leaving the model and loop frozen. Because this contract is small and external, SIGA also supports adapter self-evolution: prior trajectories can rewrite the adapter contents without modifying the underlying agent. On GEOS, a multiphysics subsurface simulator, SIGA's main gain is reliability: on harder held-out tasks it improves TreeSim from 0.720 to 0.789 and reduces across-run standard deviation by about 16x by preventing empty or invalid decks. In a human calibration, SIGA reaches in about five minutes the deck quality a domain expert reached in about three hours. Transfers to OpenFOAM and LAMMPS show the recipe is portable but interface-dependent: completion gates help when structural completeness is the bottleneck, while memory and retrieval help when value correctness is.

cs.AI

Learning the Universe: The Structure of Dust Attenuation Curves in Galaxy Simulations

Dust attenuation is a major source of systematic uncertainty in both SED fitting and forward modeling of galaxy populations, yet the functional form used to parameterize attenuation curves has received surprisingly little systematic scrutiny. Particular unanswered questions include: how many free parameters are genuinely needed, and which analytic expression best captures the full diversity of attenuation curve shapes in galaxies across cosmic time? Using a large library of synthetic attenuation curves from TNG50 and TNG100 galaxies post-processed with the SKIRT radiative transfer code using three dust mixtures (Milky Way, SMC, and stellar dust), we show via Information-Ordered Bottleneck analysis that exactly four parameters are needed to capture the diversity of attenuation curves. Guided by this result, we use symbolic regression to derive a new, interpretable four-parameter attenuation model that outperforms existing parameterizations in recovering both attenuation curves and emergent fluxes across all dust mixtures explored. The four parameters of this model have clear physical interpretations: UV bump strength, FUV slope, UV-bump transition curvature, and large-scale optical slope. Their correlations with galaxy properties are primarily regulated by star-formation rate surface density, metallicity, and stellar-dust geometry, and are largely preserved across dust mixtures -- except for the bump-sensitive parameters, which retain a stronger dependence on grain composition. We further provide symbolic-regression scaling relations linking all four parameters to quasi-observable galaxy properties, offering a physically motivated route to assign realistic attenuation curves in SED fitting and forward modeling without radiative-transfer calculations.

astro-ph.GA

Introducing sapphire: Towards Hybrid Physics-Informed, Data-Driven Modeling of Galaxy Formation

Semi-analytic models (SAMs) have been treating galaxy populations as dynamical systems for $\gtrsim50$ years, but their evolution equations remain poorly constrained. We introduce sapphire, a modular, automatically differentiable, GPU-accelerated SAM written in JAX. For the first time, we compute exact Jacobian and Hessian matrices of a galaxy formation SAM, using the Pandya et al. (2023) nonlinear differential equation system as an example. These allow efficient, interpretable local and global sensitivity analyses, which reveal that supernova energy loading is the key astrophysical parameter. We use gradient descent and Hamiltonian Monte Carlo (HMC) to perform comprehensive mock parameter recovery tests. These indicate that the $z=0$ stellar-to-halo-mass relation alone does not contain enough information to infer many astrophysical parameters. Using observations of star-forming galaxies from the MaNGA survey and the Behroozi et al. (2019) empirical model as one baseline, we derive multiple posteriors assuming different combinations of data, including $z=0$ interstellar medium gas fractions and metallicities. The inferred physical parameters suggest that galaxies self-regulate their star formation primarily through preventative rather than ejective feedback, though this remains uncertain due to the lack of satellite galaxies, black holes and multi-phase galactic atmosphere physics. Both Fisher and HMC forecasts demonstrate the potential of sapphire to enable precision inference for galaxy formation and cosmology in a hybrid physics-informed, data-driven way, but more work is needed to expand its library of models and methods. We make sapphire publicly available at https://github.com/virajpandya/sapphire.

astro-ph.GA

Learning at the Edge: Tailed-Uniform Sampling for Robust Simulation-Based Inference

We introduce the Tailed-Uniform proposal distribution for generating training simulations in simulation-based inference. Instead of sampling parameters uniformly within bounded regions, we extend the distribution beyond prior boundaries with smooth Gaussian tails. This eliminates sharp transitions that cause neural posterior estimators to fail when the posterior distribution intersects or extends beyond the prior bounds. We show these benefits on a toy problem and cosmological parameter inference from the matter power spectrum. Such an advantage grows in high dimensions, where boundaries dominate parameter space volume. All code is publicly available on Github at https://github.com/chaipattira/tailed-uniform-sbi.

astro-ph.IM

Flexible Simulation Based Inference for Galaxy Photometric Fitting with Synthesizer

We introduce Synference, a new, flexible Python framework for galaxy SED fitting using simulation-based inference (SBI). Synference leverages the Synthesizer package for flexible forward-modelling of galaxy SEDs and integrates the LtU-ILI package to ensure best practices in model training and validation. In this work we demonstrate Synference by training a neural posterior estimator on $10^6$ simulated galaxies, based on a flexible 8-parameter physical model, to infer galaxy properties from 14-band HST and JWST photometry. We validate this model, demonstrating excellent parameter recovery (e.g. R$^2>$0.99 for M$_\star$) and accurate posterior calibration against nested sampling results. We apply our trained model to 3,088 spectroscopically-confirmed galaxies in the JADES GOODS-South field. The amortized inference is exceptionally fast, having nearly fixed cost per posterior evaluation and processing the entire sample in $\sim$3 minutes on a single CPU (18 galaxies/CPU/sec), a $\sim$1700$\times$ speedup over traditional nested sampling or MCMC techniques. We demonstrate Synference's ability to simultaneously infer photometric redshifts and physical parameters, and highlight its utility for rapid Bayesian model comparison by demonstrating systematic stellar mass differences between two commonly used stellar population synthesis models. Synference is a powerful, scalable tool poised to maximise the scientific return of next-generation galaxy surveys.

astro-ph.GA

ArcMemo: Abstract Reasoning Composition with Lifelong LLM Memory

While inference-time scaling enables LLMs to carry out increasingly long and capable reasoning traces, the patterns and insights uncovered during these traces are immediately discarded once the context window is reset for a new query. External memory is a natural way to persist these discoveries, and recent work has shown clear benefits for reasoning-intensive tasks. We see an opportunity to make such memories more broadly reusable and scalable by moving beyond instance-based memory entries (e.g. exact query/response pairs, or summaries tightly coupled with the original problem context) toward concept-level memory: reusable, modular abstractions distilled from solution traces and stored in natural language. For future queries, relevant concepts are selectively retrieved and integrated into the prompt, enabling test-time continual learning without weight updates. Our design introduces new strategies for abstracting takeaways from rollouts and retrieving entries for new queries, promoting reuse and allowing memory to expand with additional experiences. We evaluate on ARC-AGI, a benchmark that stresses compositional generalization and abstract reasoning, making it a natural fit for concept memory. Our method yields a 7.5% relative gain over a strong no-memory baseline with performance continuing to scale with inference compute. We find abstract concepts to be the most consistent memory design, outscoring the baseline at all tested inference compute scales. Moreover, dynamically updating memory during test-time outperforms fixed settings, supporting the hypothesis that accumulating and abstracting patterns enables further solutions in a form of self-improvement. Code is available at https://github.com/matt-seb-ho/arc_memo.

cs.AI

Simulation-Based Inference for Direction Reconstruction of Ultra-High-Energy Cosmic Rays with Radio Arrays

Ultra-high-energy cosmic-ray (UHECR) observatories require unbiased direction reconstruction to enable multi-messenger astronomy with sparse, nanosecond-scale radio pulses. Explicit likelihood methods often rely on simplified models, which may bias results and understate uncertainties. We introduce a simulation-based inference pipeline that couples a physics-informed graph neural network (GNN) to a normalizing-flow posterior within the Learning the Universe Implicit Likelihood Inference framework. Each event is seeded by an analytic plane-wavefront fit; the GNN refines this estimate by learning spatiotemporal correlations among antenna signals, and its frozen embedding conditions an eight-block autoregressive flow that returns the full Bayesian posterior. Trained on about $8,000$ realistic UHECR air-shower simulations generated with the ZHAireS code, the posteriors are temperature-calibrated to meet empirical coverage targets. We demonstrate a sub-degree median angular resolution on test UHECR events, and find that the nominal 68% highest-posterior-density contours capture $71\% \pm 2\%$ of true arrival directions, indicating a mildly conservative uncertainty calibration. This approach provides physically interpretable reconstructions, well-calibrated uncertainties, and rapid inference, making it ideally suited for upcoming experiments targeting highly inclined events, such as GRAND, AugerPrime Radio, and BEACON.

astro-ph.HE

The LZ78 Source

We study a family of processes generated according to sequential probability assignments induced by the LZ78 universal compressor. We characterize entropic and distributional properties such as their entropy and relative entropy rates, finite-state compressibility and log loss of their realizations, and the empirical distributions that they induce. Though not quite stationary, these sources are "almost stationary and ergodic;" similar to stationary and ergodic processes, they satisfy a Shannon-McMillan-Breiman-type property: the normalized log probability of their realizations converges almost surely to their entropy rate. Further, they are locally "almost i.i.d." in the sense that the finite-dimensional empirical distributions of their realizations converge almost surely to a deterministic i.i.d. law. However, unlike stationary ergodic sources, the finite-state compressibility of their realizations is almost surely strictly larger than their entropy rate by a "Jensen gap". We present simulations demonstrating the theoretical results. These sources allow to gauge the performance of sequential probability models, both classical and deep learning-based, on non-Markovian non-stationary data. As such, we apply realizations of the LZ78 source to the study of in-context learning in transformer models.

cs.IT

Designing a Machine Learning-Driven, Cross-Hardware Emulator for Noisy Quantum Computers with Gate-Based Protocols

Quantum computer emulators model the behavior and error rates of specific quantum processors. Without accurate noise models in these emulators, it is challenging for users to optimize and debug executable quantum programs prior to running them on the quantum computer, as device-specific noise is not properly accounted for. To overcome this challenge, we design a machine learning(ML)-driven approach to construct approximate device-specific emulators that applies to different hardware platforms. We apply supervised ML on a pre-generated library containing simulated gate set tomography training data. The ML model then analyses gate set tomography data from a target quantum computer to predict its noise model, which is in turn used to construct the device-specific emulator. We demonstrate the effectiveness of our protocol's emulator in estimating the unitary coupled cluster energy of the H$_2$ molecule and compare the results with those from actual quantum hardware. Remarkably, our noise model captures device noise with high accuracy, achieving a percentage relative error of just 0.128\% in expectation value relative to the actual quantum hardware. Importantly, we show that even without access to pulse-level control, noise from the quantum computer can nonetheless be characterized and independently validated by our protocol.

quant-ph

Cosmology with One Galaxy: Auto-Encoding the Galaxy Properties Manifold

Cosmological simulations like CAMELS and IllustrisTNG characterize hundreds of thousands of galaxies using various internal properties. Previous studies have demonstrated that machine learning can be used to infer the cosmological parameter $\Omega_m$ from the internal properties of even a single randomly selected simulated galaxy. This ability was hypothesized to originate from galaxies occupying a low-dimensional manifold within a higher-dimensional galaxy property space, which shifts with variations in $\Omega_m$. In this work, we investigate how galaxies occupy the high-dimensional galaxy property space, particularly the effect of $\Omega_m$ and other cosmological and astrophysical parameters on the putative manifold. We achieve this by using an autoencoder with an Information-Ordered Bottleneck (IOB), a neural layer with adaptive compression, to perform dimensionality reduction on individual galaxy properties from CAMELS simulations, which are run with various combinations of cosmological and astrophysical parameters. We find that for an autoencoder trained on the fiducial set of parameters, the reconstruction error increases significantly when the test set deviates from fiducial values of $\Omega_m$ and $A_{\text{SN1}}$, indicating that these parameters shift galaxies off the fiducial manifold. In contrast, variations in other parameters such as $\sigma_8$ cause negligible error changes, suggesting galaxies shift along the manifold. These findings provide direct evidence that the ability to infer $\Omega_m$ from individual galaxies is tied to the way $\Omega_m$ shifts the manifold. Physically, this implies that parameters like $\sigma_8$ produce galaxy property changes resembling natural scatter, while parameters like $\Omega_m$ and $A_{\text{SN1}}$ create unsampled properties, extending beyond the natural scatter in the fiducial model.

astro-ph.CO

Learning the Universe: physically-motivated priors for dust attenuation curves

Understanding the impact of dust on the spectral energy distributions (SEDs) of galaxies is crucial for inferring their physical properties and for studying the nature of interstellar dust. We analyze dust attenuation curves for $\sim 6400$ galaxies ($M_{\star} \sim 10^9 - 10^{11.5}\,M_{\odot}$) at $z=0.07$ in the IllustrisTNG50 and TNG100 simulations. Using radiative transfer post-processing, we generate synthetic attenuation curves and fit them with a parametric model that captures known extinction and attenuation laws (e.g., Calzetti, MW, SMC, LMC) and more exotic forms. We present the distributions of the best-fitting parameters: UV slope ($c_1$), optical-to-NIR slope ($c_2$), FUV slope ($c_3$), 2175 Angstrom bump strength ($c_4$), and normalization ($A_{\rm V}$). Key correlations emerge between $A_{\rm V}$ and the star formation rate surface density $\Sigma_{\rm SFR}$, as well as the UV slope $c_1$. The UV and FUV slopes ($c_1, c_3$) and the bump strength and visual attenuation ($c_4, A_{\rm V}$) exhibit robust internal correlations. Using these insights from simulations, we provide a set of scaling relations that predict a galaxy's median (averaged over line of sight) dust attenuation curve based solely on its $\Sigma_{\rm SFR}$ and/or $A_{\rm V}$. These predictions agree well with observed attenuation curves from the GALEX-SDSS-WISE Legacy Catalog despite minor differences in bump strength. This study delivers the most comprehensive library of synthetic attenuation curves for local galaxies, providing a foundation for physically motivated priors in SED fitting and galaxy inference studies, such as those performed as part of the Learning the Universe Collaboration.

astro-ph.GA

Learning the Universe: $3\ h^{-1}{\rm Gpc}$ Tests of a Field Level $N$-body Simulation Emulator

We apply and test a field-level emulator for non-linear cosmic structure formation in a volume matching next-generation surveys. Inferring the cosmological parameters and initial conditions from which the particular galaxy distribution of our Universe was seeded can be achieved by comparing simulated data to observational data. Previous work has focused on building accelerated forward models that efficiently mimic these simulations. One of these accelerated forward models uses machine learning to apply a non-linear correction to the linear $z=0$ Zeldovich approximation (ZA) fields, closely matching the cosmological statistics in the $N$-body simulation. This emulator was trained and tested at $(h^{-1}{\rm Gpc})^3$ volumes, although cosmological inference requires significantly larger volumes. We test this emulator at $(3\ h^{-1}{\rm Gpc})^3$ by comparing emulator outputs to $N$-body simulations for eight unique cosmologies. We consider several summary statistics, applied to both the raw particle fields and the dark matter (DM) haloes. We find that the power spectrum, bispectrum and wavelet statistics of the raw particle fields agree with the $N$-body simulations within ${\sim} 5 \%$ at most scales. For the haloes, we find a similar agreement between the emulator and the $N$-body for power spectrum and bispectrum, though a comparison of the stacked profiles of haloes shows that the emulator has slight errors in the positions of particles in the highly non-linear interior of the halo. At these large $(3\ h^{-1}{\rm Gpc})^3$ volumes, the emulator can create $z=0$ particle fields in a thousandth of the time required for $N$-body simulations and will be a useful tool for large-scale cosmological inference. This is a Learning the Universe publication.

astro-ph.CO

RTFAST-Spectra: Emulation of X-ray reverberation mapping for active galactic nuclei

Bayesian analysis has begun to be more widely adopted in X-ray spectroscopy, but it has largely been constrained to relatively simple physical models due to limitations in X-ray modelling software and computation time. As a result, Bayesian analysis of numerical models with high physics complexity have remained out of reach. This is a challenge, for example when modelling the X-ray emission of accreting black hole X-ray binaries, where the slow model computations severely limit explorations of parameter space and may bias the inference of astrophysical parameters. Here, we present RTFAST-Spectra: a neural network emulator that acts as a drop in replacement for the spectral portion of the black hole X-ray reverberation model RTDIST. This is the first emulator for the reltrans model suite and the first emulator for a state-of-the-art x-ray reflection model incorporating relativistic effects with 17 physically meaningful model parameters. We use Principal Component Analysis to create a light-weight neural network that is able to preserve correlations between complex atomic lines and simple continuum, enabling consistent modelling of key parameters of scientific interest. We achieve a $\mathcal{O}(10^2)$ times speed up over the original model in the most conservative conditions with $\mathcal{O}(1\%)$ precision over all 17 free parameters in the original numerical model, taking full posterior fits from months to hours. We employ Markov Chain Monte Carlo sampling to show how we can better explore the posteriors of model parameters in simulated data and discuss the complexities in interpreting the model when fitting real data.

astro-ph.HE

Learning the Universe: Cosmological and Astrophysical Parameter Inference with Galaxy Luminosity Functions and Colours

We perform the first direct cosmological and astrophysical parameter inference from the combination of galaxy luminosity functions and colours using a simulation based inference approach. Using the Synthesizer code we simulate the dust attenuated ultraviolet-near infrared stellar emission from galaxies in thousands of cosmological hydrodynamic simulations from the CAMELS suite, including the Swift-EAGLE, IllustrisTNG, Simba & Astrid galaxy formation models. For each galaxy we calculate the rest-frame luminosity in a number of photometric bands, including the SDSS $\textit{ugriz}$ and GALEX FUV & NUV filters; this dataset represents the largest catalogue of synthetic photometry based on hydrodynamic galaxy formation simulations produced to date, totalling >200 million sources. From these we compile luminosity functions and colour distributions, and find clear dependencies on both cosmology and feedback. We then perform simulation based (likelihood-free) inference using these distributions to constrain $\Omega_m$, $\sigma_8$, and four parameters controlling the strength of stellar and AGN feedback. Both colour distributions and luminosity functions provide complementary information on certain parameters when performing inference. We achieve constraints on the stellar feedback parameters, as well as $\Omega_m$ and $\sigma_8$. The latter is attributable to the fact that the photometry encodes the star formation-metal enrichment history of each galaxy; galaxies in a universe with a higher $\sigma_8$ tend to form earlier and have higher metallicities, which leads to redder colours. We find that a model trained on one galaxy formation simulation generalises poorly when applied to another, and attribute this to differences in the subgrid prescriptions, and lack of flexibility in our emission modelling. The photometric catalogues are publicly available at: https://camels.readthedocs.io/

astro-ph.GA

Proof Flow: Preliminary Study on Generative Flow Network Language Model Tuning for Formal Reasoning

Reasoning is a fundamental substrate for solving novel and complex problems. Deliberate efforts in learning and developing frameworks around System 2 reasoning have made great strides, yet problems of sufficient complexity remain largely out of reach for open models. To address this gap, we examine the potential of Generative Flow Networks as a fine-tuning method for LLMs to unlock advanced reasoning capabilities. In this paper, we present a proof of concept in the domain of formal reasoning, specifically in the Neural Theorem Proving (NTP) setting, where proofs specified in a formal language such as Lean can be deterministically and objectively verified. Unlike classical reward-maximization reinforcement learning, which frequently over-exploits high-reward actions and fails to effectively explore the state space, GFlowNets have emerged as a promising approach for sampling compositional objects, improving generalization, and enabling models to maintain diverse hypotheses. Our early results demonstrate GFlowNet fine-tuning's potential for enhancing model performance in a search setting, which is especially relevant given the paradigm shift towards inference time compute scaling and "thinking slowly."

cs.CL