Fixed-count isotropic omni-foveation

dinov3_isotropic_multi_cmf adapts DINOv3-S+ with the standard ImageNet multi-CMF recipe. isotropic_fixn_calibrated is a new, deterministic sampling style; existing isotropic checkpoints retain their original geometry.

This single recipe uses cortical surface geodesics, visual Cartesian RoPE, automatic inward patch placement, and a 24-by-24 reference kernel. The pretrained 16-by-16 DINOv3 patch weights are bilinearly resized to that reference kernel.

Each level has exactly resolution**2 real retinal samples and (resolution // patch_size)**2 real patch centers. Integer ring populations are calibrated while retaining logarithmic radial spacing, the specified CMF, and the outer field radius. Spherical calibration adjusts the target population of each ring for its angular circumference rather than treating eccentricity as a planar radius. No intrinsic relaxation is applied. This reduces radial/tangential spacing distortion; it does not guarantee perfect discrete isotropy or eliminate the aligned angular seams between rings.

At construction, the existing covering-kNN patch builder supplies neighbors and reference-bin assignments for every level. Forward and transposed incidence tables are registered as nonpersistent buffers. Native CUDA reductions select the correct table per image, then one shared linear projection applies the learned patch weights. No per-level batch splitting, dense edge-feature tensor, or expanded weight tensor is needed. The input-gradient kernel uses the reverse incidence tables, with no atomic accumulation. A CPU reference implementation supports inspection and tests.

The per-image cmf_indices also select the configured patch positions for RoPE. All fixations of one image reuse its level; flattening fixations into the batch repeats the indices in fixation-major order. Evaluation requires explicit level indices, and existing per-CMF validation metrics are retained. Already-sampled omni-isotropic views passed with fixated_inputs=True require their original indices in both training and evaluation; selecting a new level would apply the wrong patch neighborhoods and positions to those samples.

Omni-isotropic banks require model.arch: fovi_dinov3; direct backbone calls always require cmf_indices. For two-view SSL, configure an SSL training loss, saccades.ssl_policy: multi_random, and saccades.n_fixations: 2. The SSL path uses its dedicated projector and returns embeddings shaped [batch, views, dim].

The configuration uses cortical surface geodesics (sample_cortex: geodesic), as in historical single-strength isotropic pretraining. The backbone uses visual Cartesian RoPE; the warped omni baseline uses native grid RoPE. These differences must be considered when interpreting comparisons.

Visualization, distance metrics, and positions

Calibrated isotropic sampling supports the same isotropic_plotting_type layouts as historical isotropic sampling: v1like gives the inverted, separated hemifield complex-log display; schwartz gives the upright complex-log display; and warp gives the normalized radial-log disc. The option only affects isotropic visualization, not sample positions, cortical geometry, patch neighborhoods, or model positional encoding. Warped-Cartesian sampling ignores this isotropic option and retains its native grid layout.

Earlier revisions displayed an unnormalized radial-log disc under the v1like name. v1like now has its established hemifield meaning; select warp for a radial disc normalized by the full field radius. Inset patches use their actual eccentricity within that full field for all layouts.

The geodesic neighborhood builder triangulates the real samples, spatial padding and actual patch centers together. PyGeodesic solves distances on this piecewise-linear surface, approximating the smooth manifold. This path does not snap patch origins to retinal samples or restrict candidate neighbors. Historical single-level geodesic construction is unchanged. Reference bin coordinates retain the existing chord-radius/visual-angle convention.

Model construction caches checksummed distances in $XDG_CACHE_HOME/fovi/geodesic (or ~/.cache/fovi/geodesic when XDG is unset). Set FOVI_GEODESIC_CACHE_DIR to override the directory, or to an empty string to disable caching. Entries are keyed by exact geometry, algorithm version and solver dependency versions; corrupt entries fail explicitly. This cache only avoids CPU setup work; the CUDA convolution is unchanged, and its geometry remains fixed for the model lifetime. Writes are atomic, but simultaneous cold starts can duplicate computation; prewarm a shared cache before launching multiple ranks to avoid that work.

Other supported settings can be selected with overrides of the same recipe. saccades.sample_cortex=true uses chord distances on the embedded cortical manifold instead of surface geodesics.

model.vit.position_coordinate_space=cortical_radial_log uses the normalized radial mapping log1p(r/a) / log1p(R/a) with the original polar angle, in row/column order. This retains two-axis RoPE and its frequency allocation. Flattening distorts circumferential distances; it changes only the positional signal, not the isotropic sample locations or geodesic neighborhoods.

model.vit.position_coordinate_space=cortical_manifold_3d uses the embedded cortical row/column/height coordinates. A common scalar, the cortical radial arc length to the field boundary, normalizes all axes together. The attention width remains fixed: a 64-dimensional head has 32 rotary pairs, assigned 11/11/10 to the axes. Each axis spans the same endpoint frequencies as the original two-axis RoPE. This reallocates pretrained rotary channels and encodes extrinsic position differences, not exact geodesic displacement or rotation-invariant attention. All three ablations retain exactly the same sample and token counts.

Geometry transfer

Patch boundary placement

The recipe sets model.vit.patch_max_coord_val=auto: the existing get_in_out_coords helper regenerates the patch grid with maximum radius halfway between its provisional two outermost rings. Older saved configs without this field retain perimeter-centered outer patches (1.0) for checkpoint compatibility. Set model.vit.reference_side=16 to use the original pretrained kernel size instead of the recipe’s enlarged kernel.

Retinal coordinates and counts are unchanged, and every level still has 64 patches. Patch positions, neighborhoods, bin tables, and positional encodings are regenerated consistently; the exact-geometry cache keys prevent reuse of perimeter-centered distance tables. This is the standard boundary-placement heuristic, not a solver that optimizes RF extent. Changing this option when loading a checkpoint deliberately changes its geometry.

This implementation accepts circular planar and spherical geometry through saccades.field_geometry. The recipe retains planar pretraining geometry; set saccades.field_geometry=spherical, the intended saccades.fov, and the source saccades.camera_model calibration to build an angular sensor. Use saccades.rescale_fov=0 to retain that explicit FoV, or configure the existing calibrated crop scaling. Retinal samples, patches, cortical geodesics, and 3D RoPE all use the selected metric. Spherical FoV is a diameter in degrees, limited to 180 degrees. The existing cortical-manifold domain check also rejects configurations whose required outer padding exceeds the embeddable radius; this can impose a tighter limit for coarse grids and strong foveation.

A change in spherical field diameter or planar-to-spherical transfer requires regenerating the sample/patch grids, neighbor and reference-bin tables, and RoPE positions. Keep sample count, patch count, reference kernel dimensions, and coordinate conventions fixed to reuse learned weights. In planar geometry, scaling field diameter and unnormalized CMF a together preserves the normalized layout; spherical curvature removes that general scale invariance.

The bank supports a declared finite list of strengths. An unseen strength requires constructing another geometry, not interpolating integer neighbors. Geometry metadata is rebuilt from saved configuration rather than loaded as weights. Changes to the calibration algorithm must therefore preserve the existing style’s behavior or introduce a new versioned style.

Validation

Run pytest tests/test_omni*.py for exact counts, planar scale invariance, independent scalar-layer parity, CUDA derivatives, mixed-level end-to-end routing, checkpoint reconstruction, patch boundary placement, reference-kernel resizing, and spherical geometry. Run python scripts/check_omni_isotropic.py --batch-size 128 --output /tmp/omni-smoke to qualify the actual pretrained model and optimizer on a GPU before training. Pass --config-name to qualify a custom configuration.