Vision foundation models which have demonstrated significant potential in multimedia applications are often underutilized in the natural sciences. This is primarily due to mismatches between the nature of domainspecific scientific data and the typical training data used for foundation models leading to distribution shift. Scientific images can have unique structure and characteristics and researchers often face the challenge of optimizing model performance with only a few hundred or thousand labeled examples. Furthermore the choice of vision foundation model can be nontrivial as each model exhibits unique strengths and limitations influenced by differences in architecture training procedures and the datasets used for training. In this work we evaluate the application of various vision foundation models to images from optical and radio astronomy. Our results show that use of certain foundation models improves the classification accuracy of optical galaxy images compared to conventional supervised training. Similarly we achieve equivalent or better performance in object detection tasks with radio images. However their performance in classifying radio galaxy images is generally poor and often inferior to traditional supervised training results. These findings suggest that selecting suitable vision foundation models for astrophysics applications requires careful consideration of the model characteristics and alignment with the specific requirements of the downstream tasks.
['Astrophysics - Instrumentation and Methods for Astrophysics']
Vision foundation models can they be applied to astrophysics data
{'Erica Lastufka': 'Department of Computer Science University of Geneva Geneva, Switzerland 1211 erica.lastufka@unige.ch', 'Vitaliy Kinakh': 'University of Geneva Geneva, Switzerland 1211 vitaliy.kinakh@unige.ch', 'Mariia Drozdova': 'University of Geneva Geneva, Switzerland 1211 mariia.drozdova@unige.ch', 'Davide Piras': 'University of Geneva Geneva, Switzerland 1211 davide.piras@unige.ch', 'Svyatoslav Voloshynovskiy': 'University of Geneva Geneva, Switzerland 1211 Svyatoslav.Voloshynovskyy@unige.ch', 'Abstract': 'Vision foundation models, which have demonstrated significant potential in multimedia applications, are often underutilized in the natural sciences. This is primarily due to mismatches between the nature of domain-specific scientific data and the typical training data used for foundation models, leading to distribution shift. Scientific images can have unique structure and characteristics, and researchers often face the challenge of optimizing model performance with only a few hundred or thousand labeled examples. Furthermore, the choice of vision foundation model can be non-trivial, as each model exhibits unique strengths and limitations, influenced by differences in architecture, training procedures, and the datasets used for training. In this work, we evaluate the application of various vision foundation models to images from optical and radio astronomy. Our results show that use of certain foundation models improves the classification accuracy of optical galaxy images compared to conventional supervised training. Similarly, we achieve equivalent or better performance in object detection tasks with radio images. However, their performance in classifying radio galaxy images is generally poor and often inferior to traditional supervised training results. These findings suggest that selecting suitable vision foundation models for astrophysics applications requires careful consideration of the model characteristics and alignment with the specific requirements of the downstream tasks.', '1 Introduction': "In recent years, foundation models have enabled significant advancements in both language and image processing. These large models, trained on vast amounts of data encompassing multiple domains, serve as a cornerstone for numerous everyday applications. Foundation models are designed either for representation learning, where the goal is to capture essential characteristics of the data, or for generative purposes, where the model attempts to produce new data samples similar to the  \ntraining distribution. In this work, we focus on the potential of the learned representations from vision foundation models applied to astrophysical images.  \nA variety of architectural innovations and training methodologies have been employed to capture complex patterns in large datasets of natural images, some scraped from the internet and others, like ImageNet [DDS + 09], more curated. For many computer vision applications, this provides a robust starting point for further adaptation via fine-tuning for specialized downstream tasks (DSTs). However, the diversity and complexity inherent in foundation models pose substantial hurdles for scientists in fields such as physics, astronomy, and biology, who wish to apply these tools for domain-specific inquiries.  \nThe objectives and data used for scientific DSTs are neither known nor used during the training of foundation models. Foundation models are typically trained in a self-supervised or weakly supervised way. Thus, in accordance to the information bottleneck principle [TPB00], it is not obvious whether these models are able to retain features related to the DST, namely sufficient statistics, in their learned representations. If, as suggested, only DST-related information should be kept in the model's representations (and the rest filtered out), it is difficult to determine what, if any, relevant information a foundation model trained on ImageNet might have for astronomy. Furthermore, since there is likely a misalignment between the training data distribution and the DST data distribution, this can result in the problem of distribution shift .  \nIn addition to theoretical concerns, practitioners face the challenge of finding optimal fine-tuning techniques . Given that labeled data available for scientific applications is typically limited, identifying the appropriate training objective, data augmentations, model architecture, and training hyperparameters is essential to enhance the model's performance. Firstly, there is the challenge of selecting an appropriate model, which is both critical and non-trivial, requiring a deep understanding of the model's compatibility with the DST data distribution. Secondly, performance variation across different tasks and datasets can be perplexing. Some models excel with minimal labeled data, while others might require substantial label-rich datasets to perform effectively. This performance disparity is often not linear and depends on the nature and volume of the training examples provided for the DST. Thirdly, the feasibility of deploying these models is constrained by available computational capabilities, which varies dramatically based on the model's scale -- from small to giant models. Finally, all of this investigation requires time and substantial effort from domain experts in both the topic of interest and in machine learning best practices.  \nThe goal of our paper is to address this first challenge by investigating the differences between foundation models and the implications for obtaining optimal task-specific performance. Our experiments used images from both optical and radio astronomy, and we examined classification and detection tasks. By applying various foundation models to these datasets and DSTs, this paper seeks to bridge the gap between advanced machine learning techniques and practical scientific research.", '2 Use of Foundation Models in Astrophysics': "Figure 1 illustrates the differences between natural images that comprise common training datasets like ImageNet and images from optical and radio astronomy. Unlike natural images, astrophysics images tend to have the following properties:  \nSparseness : most images consist of several objects that occupy a small fraction of the total image. Histograms of radio and optical images demonstrate how many pixels have very low brightness.  \nNoise : systematic noise is present in the images (this is especially notable for the radio images).  \nHigh dynamic range : the brightness of the objects in the image can span several orders of magnitude, so traditional normalization is difficult. The ideal combination of filters or scaling for image display is often determined by research goals (e.g., emphasizing diffuse emission over compact sources).  \nArtefacts : instrumental effects or residuals from image reconstruction can form spurious structures of different scales in the images.  \nBecause of these fundamental differences, it is commonly assumed in the academic community that vision models trained on natural images are inadequate for performing tasks in astronomy, especially radio astronomy, where images are mathematically reconstructed from sparse samples measured in the Fourier plane.  \nFigure 1: Random samples from each of the following datasets: ImageNet-1K (top row), GalaxyMNIST (second row), Radio Galaxy Zoo (RGZ, third row), MeerKAT MGCLS (bottom row). GalaxyMNIST and RGZ are labeled according to morphology class, while MGCLS is labeled by the number of compact sources present. White boxes indicate object bounding boxes used for source detection, when applicable. The rightmost two columns display sample images in their raw data format, unscaled, with an accompanying histogram. GalaxyMNIST combines data from the Dark Energy Camera's r , g , and z channels, while radio images are single-channel continuum images reconstructed from Fourier space, which can therefore include negative values.  \n<!-- image -->  \nWhile there are many extremely specialized DSTs in both optical and radio astronomy, often taking advantage of the many wavelength channels available, some more common tasks involving a single or small number of channels are listed in Table 1. Machine learning can offer a number of applicable techniques, and pretrained foundation models can be of use in most cases.Table 1: Common tasks in astrophysics and their machine learning analogues.", '2.1 Data': "In this work we evaluated galaxy morphology classification and source detection, two tasks common to both optical and radio astronomy. Details of the datasets used to perform these tasks are in Table 2, and sample images, along with histograms of their un-normalized original images, are in Figure 1.  \nClassification datasets are images with a single galaxy centered in the cutout. GalaxyMNIST (GMNIST, [WLG + 22]) is a balanced dataset of four categories: smooth and round (SR), smooth and cigar-shaped (SC), edge-on-disk (E), and unbarred spiral (U). Radio Galaxy Zoo (RGZ) is unbalanced, with labels determined according to number of distinct radio components (C) and number of intensity  \npeaks (P) in each source [WGA + 24]. Possible combinations are: 1C 1P, 1C 2P, 1C 3P, 2C 2P, 2C 3P, and 3C 3P, a total of 6 classes. Labeling was done by citizen scientists who performed inspection by varying the relative intensity of continuum radio emission and infrared observations. It is not always visually obvious from the normalized PNG images if there is a difference between a cutouts containing the same number of bright peaks - for example, one containing a single galaxy with two peaks, and another two different components with one peak each. Image pre-processing was by necessity done differently than for natural images, with techniques such as below-threshold zero replacement or channel-specific normalization. Full details are given in their documentation, and for classification both datasets are used as-is, with no additional pre-processing performed.  \nTable 2: The datasets used in this study.  \nSource detection datasets also consist of cutouts from wide-field images; they may have one to six galaxies in the central area, as in RGZ, or have tens of galaxies in a single cutout, as in MGCLS. Examples of bounding boxes around sources are shown in Figure 1. MGCLS labels are consistent in that the boxes only designate compact sources, and not other examples of extended emission or larger sources that might also be present in the images. Because RGZ's labels also contain extended sources, bounding boxes can much larger and filled with a large amount of noise.", '2.2 Foundation Models': "Foundation models exhibit significant variability in terms of their architectures, training, and performance characteristics. These differences arise from factors such as the size and nature of the training datasets, the number of parameters they incorporate, and their underlying architectural frameworks. Moreover, these models leverage a carefully curated set of data augmentation techniques and diverse pretraining strategies, each tailored to minimize a specific loss function. Table 3 lists the foundation models investigated in this study. With the exception of DINOv2, all were pretrained on ImageNet-1k's 1.2 million training images.  \nTable 3: The foundation models used in this study.  \nMAE . The Masked AutoEncoder (MAE, [HCX + 21]) uses masked image modeling (MIM) pretraining, reconstructing masked image patches from only a few visible patches. Unlike NLP inspired approaches like BeIT [BDPW21], which discretize visual tokens through an autoencoder, MAE directly processes the visible image patches through an encoder. The resulting output is then combined with mask tokens to reconstruct the original image using a decoder. Reconstruction error is used as the objective training function.  \nDINO . DINOv2 [ODM + 23] improves upon its predecessor, DINOv1 [CTM + 21], by utilizing a larger and more curated dataset, LVD-142M. DINOv2 integrates the DINO cross-entropy loss with  \nthe MIM objective employed in iBOT [ZWW + 22]. DINOv2 benefits from the Sinkhorn-Knopp batch normalization technique used in SwAV [CMM + 20]. The model employs a teacher-student training paradigm, where a teacher network computes the feature representation of global views of an image, while a student network computes the feature representation of local views, a series of smaller crops. The model is optimized to train the student to replicate the teacher's output, and the teacher is periodically updated using an exponential moving average (EMA) of the student's parameters.  \nMSN . Masked Siamese Networks (MSN, [ACM + 22]) combine MIM with Siamese networks to avoid pixel-level and token-level reconstructions. MSN also uses teacher-student training, with the student network computing the feature representation of a partially masked image.  \nResNet . Residual Networks are a staple of computer vision, introduced by in [HZRS16]. They are convolutional neural networks (CNNs) that use skip connections to bypass one or more layers, allowing the network to maintain accuracy over very deep networks. ResNet18 consists of 8 blocks, while ResNet50 has 16. We use the pre-trained weights available through torchvision [mc16], which were obtained by training in a supervised fashion for classification of ImageNet-1k using cross-entropy loss. A series of very specific data augmentations, including TrivialAugment [MH21], random erasing, mixup and cutmix, helped increase top-1 accuracy relative to the original augmentation scheme.", '2.3 UMAP Illustration': "Figure 2: GMNIST (upper row) and RGZ (lower row) UMAP for features extracted using DINOv2, MSN, MAE, and Resnet50.  \n<!-- image -->  \nWe provide empirical evidence that foundation models learn different representations of the same data. Extracting features from each foundation model and dataset, performing PCA and dimensionality reduction using the first 10 components with UMAP illustrates the latent space (Figure 2). We chose UMAP over T-SNE as UMAP better preserves global structure, which is important when local structure in the images might be dominated by noise. For the unbalanced RGZ dataset, a random sample with balanced classes is displayed.  \nAlthough UMAP attempts to distill the relationships between thousand-dimensional vectors into two dimensions, it can still reveal clusters where images with similar embeddings reside. This can be deceptive because the model may have not learned relevant embeddings; visualizing the associated class labels can offer insight.  \nThe UMAP representation of the DINO and MSN feature spaces for GMNIST is quite similar. Classes SR and U, representing smooth-and-round and unbarred spiral galaxies, are in distinct clusters, although MSN features show more overlap between the two than DINO's. The majority of SR and U galaxy images are separated by ResNet50 as well, although small clusters of these find themselves in other areas. Galaxies that appear predominantly elliptical - smooth-and-cigar-shaped (SC) and edge-on-disk (E) - share similar latent space embeddings; clustering is most distinct for DINOv2.  \nLatent space grouping according to class is far less evident with the RGZ data. The best visible separation is seen in ResNet50. The ResNet model we used was trained with the goal of image classification, as opposed to DINO and MSN, which seek to reconcile local and global image characteristics, and MAE, whose objective is image reconstruction.  \nThrough visualization of the latent space, we see that our chosen foundation models retain more representations that are class-relevant for GMNIST than RGZ. This is not to say that the learned representations are completely unrelated to the information contained in RGZ, simply that the most important features (according to PCA) are not strongly correlated with image class.", '2.4 Downstream Task Study Methodology': "For image classification , we used the models 'out-of-the-box' by attaching a single-layer linear classifier head to the pre-trained foundation model backbone. Only the classifier was allowed to train, so the backbone is considered frozen in that the weights and biases of the backbone stay fixed. Full fine-tuning of the system by also allowing the backbone parameters to update is known to improve performance, but corresponding compute time is over a hundred times more. As we are investigating model selection, we do not compare with full fine-tuning or hyperparameter optimization. We do compare results with fully supervised classifiers; in this case, both the backbone network used as well as the classifier head were allowed to train. Except for supervised training, all tasks were able to be performed on a NVIDIA GeForce RTX laptop GPU. Training and evaluation took between 10 seconds (10% of training data) to 45 seconds (all training data) per run. Supervised training took from 30 minutes (10% of training data) to 4 hours (all training data) on two NVIDIA TITAN Xp GPUs.  \nSource detection was done in a similar fashion, using Faster-RCNN [RHGS17]. The implementation of Faster-RCNN is slightly different for Vision Transformers and CNNs. For a Vision Transformer backbone, a simple feature pyramid network (FPN) based on only the output of the last large-stride feature map of the backbone is used [LMGH22]. The Faster-RCNN implementation using ResNet also uses a FPN, but one that is heirarchical, acting on feature maps from different convolutional blocks in the ResNet rather than just the last one.  \nAfter the backbone and FPN, object detection is done by applying a sliding window of the region proposal network (RPN) that predicts whether an object is present or not. These proposals are pooled (RoI pooling) and finally bounding boxes and classes are predicted. We considered the FPN, RPN and RoI layers to comprise the detection head in this situation, as these components are what is attached on top of the backbone network.  \nWe again considered the case of a frozen backbone and trainable detection head and compare this to networks trained in a fully supervised fashion. For this source detection task, we also compared with fine-tuning the backbone, as compute time was on the same order of magnitude whether the backbone was frozen or fine-tuned (unlike for classification). Training time on two NVIDIA TITAN Xp GPUs was between approximately 6 to 10 hours depending on the architecture and whether the backbone was frozen or fine-tuned. Training from scratch took 5 to 11 hours.", '3 Galaxy Morphology Classification': "Galaxy morphology classification is a common task in both optical and radio astronomy, and large labeled datasets have been produced thanks to Galaxy Zoo projects [WLG + 22, WGA + 24]. Previous deep learning approaches in optical classification have relied heavily on CNNs trained from scratch (e.g. [DT18, MKEB21, PPOB23, UF24]). A few works have fine-tuned ImageNet-trained models, such as [HRJLW22]'s DenseNet121 and [KPP21]'s EfficientNetB5. Some works have investigated combining the advantages of ViT's attention mechanism with CNNs, such as [WLD + 24], [Dag23] and  \n[CXD + 24]. However, application of pure ViTs has been limited and resulted in lower performance than CNNs [LLH + 22], although [KSI23] reports fine-tuning to be better than training from scratch. Radio galaxy classification work has been more limited due to lack of large datasets and a well-defined labeling scheme, and so far only employs CNNs; [BVPG21] and [NGW + 23] provide comprehensive reviews of the topic. Due to the difficult nature of the data, traditional ML techniques, feature engineering, and finding augmentations specific to radio images, are also active fields of study, while some seek to enhance training datasets with synthetic images using generative deep learning.  \nWe demonstrate the galaxy morphology classification task with both optical and radio datasets labeled courtesy of the Galaxy Zoo project. Twenty percent of RGZ images contain two labeled galaxies, and four percent contain more than two; these images were all excluded from the classification dataset, reducing the total number of samples to 4692 training images and 1189 test images. Therefore the training data available for RGZ was just over half that available for GMNIST, which was split with 80% of its 10K images in the training set. The images in both datasets were already normalized, so the only data transformation we performed was to scale the images up to the same size (224 × 224 pixels) from their native resolutions (GMNIST: 64 × 64, RGZ: 132 × 132).  \nHyperparameters for the classifier training were similar for both datasets, using a learning rate of 0.0005 and a batch size of 64. Classifiers were trained for 100 epochs on GMNIST and 200 on RGZ. Class weights inversely proportional to the number of samples present in the training dataset were used in the cross-entropy loss function used to classify RGZ. To illustrate the performance differences in low- and high-label regimes, the number of samples used for training was varied at 10%, 30%, 50% and 100%, while the test set was kept the same. For comparison, we trained a ViT-Base model with patch size 16 from scratch in a fully-supervised manner, as well as ResNets with both 50 and 18 layers. The best-performing supervised model in both cases was ResNet50.  \nFigure 3: F1 scores for optical (left) and radio (right) galaxy morphology classification, as a function of percentage of training labels. Error bars show the maximum and minimum scores out of three different runs.  \n<!-- image -->  \nFigure 3 shows classification F1 score as a function of training label percentage. While results differ according to dataset, some trends are in common. Performance generally improved when the number of training labels increased, MAE was the worst performer overall, and the smaller ResNet18 did not classify as well as ResNet50.  \nOn GMNIST, it was notable that the use of a foundation model improved classification relative to fully supervised training by up to 15%. In fact, the only configuration where starting from a foundation model was outperformed by supervised training is MAE with all available training labels. As supervised training takes hours rather than the tens of seconds required to train a linear classifier layer on frozen, there is a clear benefit to using a foundation model for this particular dataset. Even starting from a model pre-trained on natural images, one observes large increases in performance and speed.  \nDINOv2 and MSN both performed better than the ResNets, although ResNet50 improved the most when trained on 100% of the data. One might explain the superior performance of DINO and MSN by  \nthe number of parameters of their ViT-Base architectures, were it not for MAE which is also ViT-Base. Unlike DINO and MSN, which use student-teacher paradigms to reconcile partially masked or locally cropped views of images, MAE's objective is to reconstruct an entire image from a few patches. We speculate that MAE retains too much information that is irrelevant to classification; because large portions of GMNIST images consist of empty space, this might overly contribute to the learned representations.  \nClassification was more difficult with Radio Galaxy Zoo, with F1 scores of less than 0.6 even when using all available training labels. This could be because more of the image is dominated by noise, and less by the galaxy to be classified. The labeling schematic could be another reason for low scores, as discussed in Section 2.1. Only MSN out-performed supervised training, and only for a low percentage of training labels.  \nThe poor performance on radio galaxy classification is not consistent with results from previous works such as [SSW + 24] and [LBT + 24], which have shown much higher F1 scores (up to 0.94 for DINOv2) achieved on the MiraBest dataset [PS23] using pre-trained foundation models. MiraBest is designed for binary classification in the Fanarhoff-Riley scheme, which could be roughly described as a single Gaussian component with one peak versus a single component with two peaks.  \nChallenges with the RGZ dataset may stem from the more subtle characteristics that distinguish the classes. Figure 4 (left side) shows that classification for galaxies with two radio components and either two or three bright peaks is especially poor. Re-labeling the images by the number of bright peaks resulted in F1 scores of up to 0.74 (seen on the right side of Figure 4), with all models but MAE out-performing a supervised baseline. Conversely, when re-labeling the images by the number of distinct radio components, the maximum F1 score achieved was 0.63, from MSN with all labels.  \nFigure 4: Left: F1 score per class for classification on RGZ. Models can confidently identify single Gaussian sources but struggle with multi-peaked or multi-component sources. Right: Label scheme is re-defined to the number of bright peaks (top) or number of individual radio components (bottom). Higher F1 scores in the top chart show that vision models are better at distinguishing bright peaks in images rather than flux islands defining radio components.  \n<!-- image -->  \nIt seems that foundation models struggle to identify distinct radio sources, especially when they involve multiple emission peaks. Radio flux islands, containing one or more peaks, are usually identified through analytic source-finding algorithms via connected-component labeling, starting by selecting regions of pixels above a certain flux threshold. This threshold is usually up to 10 times the background RMS, and the brightest pixels it contains can be orders of magnitude greater. This information of relative flux is lost after compression and normalization of the images.  \nUnlike GMNIST, RGZ images are reconstructions which contain noise with strong inter-pixel correlations on the scale of the synthesized beam. These statistical differences between ImageNet and radio images suggest that a well-performing model may require knowledge of a very specific set of features; a true case of distribution shift. While the out-of-the-box application of foundation models to GMNIST images performed well, it is not sufficient for classification on RGZ where it offers little to no advantage over supervised training.", '4 Source detection': 'Source detection in both optical and radio images is largely performed analytically. Work using deep learning to replace the time-consuming analytic pipelines has been done by [WWR + 19, FOD + 20, BAC + 19, RMS + 23], mainly through application of Faster- or Mask-RCNN. [SMF + 23] provides an overview of both CNN and ViT-based methods, including YOLO. More recent results based on simulated radio data include [TBDZ + 23] and [CSS + 24], which both surpass the capabilities of analytic source detection.  \nSource detection was performed on radio continuum datasets RGZ, which mostly contains single galaxies labeled by morphology, and MGCLS, where a single image contains from 10-100 individual compact sources. MGCLS images may also contain larger sources which are not labeled.  \nTable 4: Source detection results  \nAs was done for classification, images were upscaled from their native resolution. For RGZ, scaling to 224 × 224 meant that the average single object size became 55 × 55 pixels, while the 25th percentile were 24 × 24 pixels. MGCLS crops were doubled in size from 256 × 256. This was done so that the average compact source occupied 16 × 16 pixels, and the 25th percentile 14 × 14 pixels. The size of the sources relative to the transformer patch size is important; sources unable to occupy most of a patch were difficult to detect. This was proven empirically - performance on detection with MGCLS increased by more than 10% when the image size doubled.  \nWe chose to use Faster-RCNN to compare performance on object detection. Our first experiment kept the backbones frozen, allowing only the detection head layers (FPN, RPN and ROI) to train. Due to differences in architecture this resulted in a different number of trainable parameters: 21M for ViT-Det, 17.8M for Resnet50 with FPN, and 11M for Resnet18. Because of the structure of the FPN for ViT-Det, for this task the DINO backbone used was DINOv1, which had available pre-trained weights for the architecture ViT-Base with 16x16 patch size (DINOv2 uses 14x14). In the second experiment we allowed the weights and biases of the backbone networks to update as well (fine-tuning).  \nWe kept the default training data augmentations: a randomly applied blur, contrast adjustment, and color jitter. Different learning rates, varied in order to ensure a smooth decay of the training loss, were required depending on the dataset and network. Training was for 100 epochs, with a batch size of 16. Table 4 reports the mean average precision at an intersection-over-union (IOU) threshold of 50%, known as the mAP@50.  \nResults showed that MSN and DINO are good foundation models for this task. They outperformed training from scratch, even when the backbone was frozen, except for MSN on MGCLS. Although the ResNet models did not outperform training from scratch when used as a frozen backbone, they  \nequaled or exceeded that performance when fine-tuned. Detection on galaxies in the RGZ dataset appears to be a task particularly suited to ResNets, while Vision Transformers do very well at detecting compact sources in MGCLS. Generally, detection was very good on MGCLS for networks larger than ResNet18. Possible reasons for the higher mAP@50 include the single category (compact source) and the tens of sources present in the images compared to the 1-6 sources in RGZ. Additionally, bounding boxes in RGZ can be quite large, including a lot of noise and making them harder to predict accurately.  \nThese results show that transfer learning, starting with the pre-trained weights of a foundation model, is a good practice, as performance from even a frozen backbone was not worse than training from scratch, and fine-tuning improved it. It is important to ensure that properties of the architecture, such as patch size in the case of ViTs, are complementary to the data being used for the downstream task.', '5 Conclusions': 'Our results demonstrate that state-of-the-art vision foundation models can immediately perform classification of optical galaxies and source detection of radio galaxies with 72 - 88% precision. In the case of optical galaxy classification, all foundation models out-performed supervised training. F1 scores of close to 0.85 for 800 labeled training images, 10% of the available total, show that foundation models can be used to great effect for initial investigations into using machine learning for scientific tasks. Of the models tested, Vision Transformers DINOv2 and MSN performed the best, along with CNN ResNet50. MAE, despite its success on natural images, is optimized for reconstruction loss and failed to encode characteristics which are highly relevant for galaxy classification.  \nShared characteristics of the model training distribution and the images of GMNIST might have contributed to good classification performance. Even though GMNIST images contain a lot of empty space, a good portion of the image is occupied by the galaxy of interest. If stars and other objects are present in the background, they are small relative to the galaxy, even if the galaxy is seen edge-on. On the other hand, classification of radio galaxies was challenging, as even the main radio source was small and the images were dominated by noise and patterns from reconstruction. In this case, supervised training outperformed all foundation models except MSN.  \nFor a dataset like RGZ with a clear distribution shift from training to down-stream task data, applicability of foundation models is limited. The models did retain some relevant information about the data - in this case, mainly the information about bright peaks - and designing the data augmentations or label schemes to take advantage of that could improve results.  \nThe need for compatibility between the dataset, down-stream task, and foundation model appears in the source detection example as well. Once images were scaled so that the Vision Transformer patch size was smaller than the average radio source, source detection results were encouraging. High mAP@50 scores showed that foundation models larger than ResNet 18 could identify radio sources, especially when the backbone was allowed to fine-tune. However, improvements due to fine-tuning were inconsistent and (in the case of MSN) much smaller than might be expected. This situation might improve given more optimal methods of fine-tuning.  \nEven in cases where results are good, such as source detection, there remains a large gap in performance between tasks done on scientific images and tasks done on natural images. State-of-the-art classification on thousand-class ImageNet-1k has a top-1 accuracy of 92%, while the best object detection on the standard COCO dataset has a mAP@50 of 0.73, which may seem low in comparison to our results but is the average metric across all 90 classes. Closing the gap in performance is necessary to achieve scientifically meaningful results, but it will have to be done with far less computing and human resources than are available to large companies. Techniques which can operate with very few labeled training examples and by training a small number of network parameters will be especially valuable for applying vision foundation models to scientific images. In this respect, the semi-supervised learning proposed in [VTK + 20] is a very interesting option for further investigation.  \nIn this study, we considered very simple way of fine-tuning. Perhaps a more powerful fine-tuning method, based on the simultaneous use of labeled and unlabeled data, might enhance the results, as suggested in [VTK + 20]. This would be particularly exciting for astrophysics, where unlabeled data is plentiful. In future work, we will examine the potential of such semi-supervised learning framework for fine-tuning.', 'Data availability': 'GalaxyMNIST ( https://github.com/mwalmsley/galaxy\\_mnist ) and MGCLS ( https:// doi.org/10.48479/7epd-w356 ) are public datasets. Radio Galaxy Zoo ( https://radio. galaxyzoo.org/ ) will soon have its first data release, and the dataset used here is available upon reasonable request. The code and instructions to reproduce these experiments is available at https://github.com/elastufka/fm4astro .'}