Table of Contents
Fetching ...

Setting SAIL: Leveraging Scientist-AI-Loops for Rigorous Visualization Tools

Nico Schuster, Andrés N. Salcedo, Simon Bouchard, Dennis Frei, Alice Pisani, Julian E. Bautista, Julien Zoubian, Stephanie Escoffier, Wei Liu, Georgios Valogiannis, Pauline Zarrouk

Abstract

Scientists across all disciplines share a common challenge: the divide between their theoretical knowledge and the specialized skills and time needed to build interactive tools to communicate this expertise. While large language models (LLMs) offer unparalleled acceleration in code generation, they frequently prioritize functional syntax over scientific accuracy, risking visually convincing but scientifically invalid results. This work advocates the Scientist-AI-Loop (SAIL), a framework designed to harness this speed without compromising rigor. By separating domain logic from code syntax, SAIL enables researchers to maintain strict oversight of scientific concepts and constraints while delegating code implementation to AI. We illustrate this approach through two open-source, browser-based astrophysics tools: an interactive gravitational lensing visualization and a large-scale structure formation sandbox, both publicly available. Our methodology condensed development to mere days while maintaining scientific integrity. We specifically address failure modes where AI-generated code neglects phenomenological boundaries or scientific validity. While cautioning that research-grade code requires stringent protocols, we demonstrate through two examples that SAIL provides an effective code generation workflow for outreach, teaching, professional presentations, and early-stage research prototyping. This framework contributes to a foundation for the further development of AI-assisted scientific software.

Setting SAIL: Leveraging Scientist-AI-Loops for Rigorous Visualization Tools

Abstract

Scientists across all disciplines share a common challenge: the divide between their theoretical knowledge and the specialized skills and time needed to build interactive tools to communicate this expertise. While large language models (LLMs) offer unparalleled acceleration in code generation, they frequently prioritize functional syntax over scientific accuracy, risking visually convincing but scientifically invalid results. This work advocates the Scientist-AI-Loop (SAIL), a framework designed to harness this speed without compromising rigor. By separating domain logic from code syntax, SAIL enables researchers to maintain strict oversight of scientific concepts and constraints while delegating code implementation to AI. We illustrate this approach through two open-source, browser-based astrophysics tools: an interactive gravitational lensing visualization and a large-scale structure formation sandbox, both publicly available. Our methodology condensed development to mere days while maintaining scientific integrity. We specifically address failure modes where AI-generated code neglects phenomenological boundaries or scientific validity. While cautioning that research-grade code requires stringent protocols, we demonstrate through two examples that SAIL provides an effective code generation workflow for outreach, teaching, professional presentations, and early-stage research prototyping. This framework contributes to a foundation for the further development of AI-assisted scientific software.
Paper Structure (20 sections, 4 figures, 1 table)

This paper contains 20 sections, 4 figures, 1 table.

Figures (4)

  • Figure 1: Schematic of the SAIL framework. The workflow transforms a Scientific Concept into a Finalized Tool through three iterative stages: (1) Baseline Prototype for establishing core visuals, (2) Feature Expansion for integrating extended logic and new features, before moving to (3) Refinement for ensuring stability and code standardization. At each stage, the scientist verifies the AI output before proceeding, with the flexibility to cycle back to previous phases to correct errors or add features.
  • Figure 2: Example snapshots of the Gravitational Lensing Visualization interface for a point mass lens (left) and a cosmic void lens (right). Users can dynamically adjust relative mass/size, lens models (Point Mass, NFW halos, Voids), and other settings to observe exaggerated real-time shear and magnification effects on a multi-plane background. The interactive version is accessible here: https://nicosmo.github.io/lensing_visualization/
  • Figure 3: Example snapshot of the Cosmic Web Explorer in "Cosmology Comparison" mode. The application allows users to run simplified quasi-N-body visualizations directly within the browser to investigate cosmic structure formation. The initial conditions are generated from a theoretical power spectrum. Additionally, there exists the option for sculpted initial conditions to highlight the BAO signal. In both configurations, the evolution of tracer positions is based on second-order Lagrangian perturbation theory coupled with localized gravity and phenomenological adhesion. The interactive version is accessible here: https://nicosmo.github.io/cosmic_web_explorer/
  • Figure 4: Snapshot of the Cosmic Web Explorer in void-analysis mode, with BAO idealized initial conditions. This module demonstrates the evacuation of matter from underdense regions into the surrounding filaments and nodes. The tool facilitates the study of void geometry and density through interactive merging and density profiles, providing a visual intuition for the volume-dominating components of large-scale structure.