Paper-to-Code Traceability
TASK.md Sec. 55: every major paper mechanism must have a reference in the code. This table maps paper section → equation/figure → repository file → class/function.
| Paper section | Equation / Figure | Repository file | Class / function |
|---|---|---|---|
| Sec. III-A, Eq. (1) | Model overview | backend/model/earth_onevision.py | EarthOneVisionModel.forward, .build_multimodal_inputs |
| Sec. III-A | SigLIP-2 (0.3B), native dynamic resolution | backend/model/vision_encoder.py | SigLIP2VisionEncoder |
| Sec. III-A | Two-layer MLP projector, 2x2 spatial merge | backend/model/projector.py | VisionLanguageProjector |
| Sec. III-A | Qwen3 (2B) LLM | backend/model/earth_onevision.py | EarthOneVisionModel.llm (Qwen3ForCausalLM) |
| Sec. III-A | Modality input unification (2 encoding modes) | backend/data/processors/modality.py | OpticalProcessor, SARProcessor, InfraredProcessor, MultispectralProcessor, TemporalProcessor, VideoProcessor, FusionProcessor |
| Sec. IV-D | Visual prompting: points/boxes/ellipses on a separate blank image, dual-image input | backend/data/processors/visual_prompting.py | render_prompt_image, build_visual_prompting_pair |
| Sec. III-A | Multi-image concatenation | backend/model/earth_onevision.py | EarthOneVisionModel._splice_one_sample, .build_multimodal_inputs |
| Sec. III-B, Eq. (2)-(5) | Adaptive Cross-Scale Attention (ACSA) | backend/model/fgvla/acsa.py | ACSA.forward |
| Sec. III-B, Eq. (6) | DeepStack visual-language route | backend/model/fgvla/deepstack.py | DeepStackProjector, DeepStackInjector |
| Sec. III-B | S=3 intermediate ViT levels {l1,l2,l3} | backend/model/vision_encoder.py | SigLIP2VisionEncoder.intermediate_layer_indices |
| Sec. III-C, Eq. (7) | Unified vocabulary V = V_text ∪ V_coord ∪ V_seg | backend/model/slis/vocabulary.py, backend/model/tokenizer_extension.py | SLISVocabulary, extend_tokenizer_with_slis |
| Sec. III-C | Coordinate quantization q(c)=floor(c*1000) | backend/model/slis/coordinate_tokens.py | quantize_coord, dequantize_coord |
| Sec. III-C | Horizontal box (4 tokens), oriented box (8 tokens) | backend/model/slis/serializer.py | serialize_hbox, serialize_obb, SpatialObject |
| Sec. III-C | R-RLE: 24x24 max-pool downsample, row-wise RLE | backend/model/slis/r_rle.py | mask_to_rrle, rrle_to_mask, downsample_max_pool |
| Sec. IV-B | Detection/grounding spatial JSON format | backend/model/slis/serializer.py, backend/model/slis/parser.py | SpatialObject.to_token_string, parse_spatial_objects |
| Sec. III-D | Progressive Cross-Modality Adaptation (PCMA), Stage 1/2 | backend/configs/stage1.yaml, backend/configs/stage2.yaml, backend/training/train.py | load_merged_config, Trainer |
| Sec. III-D | Autoregressive cross-entropy loss, response-only masking | backend/training/loss.py | build_response_only_labels, response_only_cross_entropy |
| Sec. V-A | AdamW (wd=0.05), cosine schedule (warmup=0.03) | backend/training/trainer.py | build_optimizer, build_scheduler |
| Sec. V-A | 8xH100, DeepSpeed ZeRO-2, bf16 | backend/configs/deepspeed_zero2.json, backend/training/distributed.py | get_device_strategy |
| Sec. V-A | Stage-specific learning rates (2e-5 / 5e-6) | backend/configs/stage1.yaml, backend/configs/stage2.yaml | training.learning_rate |
| Sec. IV | MMRS-OneVision dataset schema | backend/data/schema.py | MMRSRecord, RECORD_JSON_SCHEMA |
| Sec. IV-A, Table II | Dataset source inventory | backend/data/dataset_registry.yaml, backend/data/converters/*.py | DatasetConverter subclasses |
| Sec. IV-C | GPT-assisted synthesis, factual-anchor constraint | backend/data/synthesis/ | openai_backend.py, prompts/, validators.py |
| Sec. IV-E | Data leakage prevention (test-split exclusion) | backend/data/leakage/benchmark_exclusions.yaml, backend/data/leakage/validator.py | validate_manifest_no_leakage, assert_no_leakage |
| Sec. V-A/B/C, Tables III-XVIII | Reported benchmark results | docs/paper_spec.md Sec. 4-5 | (transcription only) |
| Sec. V-D, Table XVIII | Ablations (FGVLA/SLIS/PCMA) | docs/paper_spec.md Sec. 5 | (transcription; backend/evaluation/paper_results.py for measured comparison) |
| TASK.md Sec. 38-39 | Inference + output decoding | backend/inference/pipeline.py, backend/inference/generate.py, backend/inference/decoder.py | EarthOneVisionPipeline, decode_generated_text |
| TASK.md Sec. 40-41 | Evaluation + paper-result comparison | backend/evaluation/*.py | per-task evaluate() functions, backend/evaluation/paper_results.py |
| TASK.md Sec. 53-54 | Parameter count / architecture inspection | backend/tools/count_parameters.py, backend/tools/inspect_model.py | count_params, print_tree, debug_forward |
| TASK.md Sec. 61-63 | SatQuery AI scoped dataset strategy | docs/paper_spec.md Sec. 3 scope note, backend/data/dataset_registry.yaml | - |
| SIH PS: agentic orchestration | Query classification, compatibility check, tool registry, execution trace | backend/app/backend/controller.py, backend/app/backend/registry.py | SatQueryController, classify_query, check_compatibility, TOOL_REGISTRY |