# RCSEDv2: analytic approximations of k-corrections for galaxies out to
redshift $z=1$

Anastasia Kasparova,1 Igor Chilingarian,2,1 Sviatoslav Borisov,3,1 Vladimir
Goradzhanov,1,4 Kirill Grishin,5,1 Ivan Katkov,6,1 Vladislav Klochkov,1,4
Evgenii Rubtsov,1,4 and Victoria Toptun1,4

###### Abstract

To compare photometric properties of galaxies at different redshifts, we need
to correct fluxes for the change of effective rest-frame wavelengths of filter
bandpasses, called $k$-corrections. At redshifts $z>0.3$, the wavelength shift
becomes so large that typical broadband photometric bands shift into the
neighboring rest frame band. At $z=0.6-0.8$ the shift reaches two or even
three bands. Therefore, we need perform $k$-corrections from one observed
bandpass to another. Here we expand the methodology proposed by Chilingarian
et al. (2010) and fit cross-band $k$-corrections by smooth low-order
polynomial functions of one observed color and a redshift – this approach but
without cross-band is implemented as standard functions in topcat, which can
be used for galaxies at $z<0.5$. We also computed analytic approximations for
WISE bands, which were not available in the past. We now have a complete set
of $k$-corrections coefficients, which allow us to process photometric
measurements for galaxies out to redshift $z=1$. We calculated standard and
cross-band $k$-corrections for about 4 million galaxies in second Reference
Catalog of Spectral Energy Distributions (RCSEDv2) of galaxies and we showed
that, in cases of widely used UV, optical and near-infrared filters, our
analytic approximations work very well and can be used for extragalactic data
from future wide-field surveys.

1Sternberg Astronomical Institute, Moscow State University, Moscow, Russia;
<EMAIL_ADDRESS>
2Center for Astrophysics – Harvard and Smithsonian, Cambridge, MA, USA

3Department of Astronomy, University of Geneva, Versoix, Switzerland

4Department of Physics, Moscow State University, Moscow, Russia

5Universite de Paris, CNRS, Astroparticule et Cosmologie, F-75013 Paris,
France

6New York University Abu Dhabi, Abu Dhabi, UAE

##  1 Motivation

To study galaxy evolution we need compare photometric properties of galaxies
at different redshifts by correcting fluxes for the changes of effective rest-
frame wavelengths of filter bandpasses, called $k$-corrections. At redshifts
exceeding $z=0.3$, the wavelength shift becomes so large that typical broad
photometric bands shift into the neighboring rest-frame bands (e.g. an
observed SDSS $r$ into a rest-frame SDSS $g$). At redshifts approaching
$z=0.7$ the shift reaches two bands. Therefore, for practical purposes we need
calculate cross-band $k$-corrections, which, when applied, will convert an
observed magnitude in a given band to a rest-frame magnitude in another band.
As it was demonstrated by Chilingarian et al. (2010) and Chilingarian &
Zolotukhin (2012), $k$-corrections for non-active galaxies at $z<0.5$ can be
precisely fitted by low-order two-dimensional polynomial functions of a
redshift and a properly chosen observed color. This approach has a great
advantage over widely used fitting of a broadband spectral energy distribution
(SED) implemented e.g. in the kcorrect package (Blanton & Roweis 2007) because
it requires only one observed color rather than a full SED. The coefficients
from Chilingarian & Zolotukhin (2012) are implemented as kCorr_*() functions
in topcat (Taylor 2005) and were used to compute $k$-corrections in the RCSED
project (Chilingarian et al. 2017). Here we expand the low-order fitting
approach to cross-band $k$-corrections, which one can use up-to a redshift
$z=1$.

Figure 1.: Left: example of a broadband SED fitting using a set of kcorrect
templates. Right: the 3D distribution of galaxies in the (z, $g-r$,
$k_{corr}(g\rightarrow u)$ space with the redshift color-coded.

Figure 2.: The fitting examples of the cross-band K-corrections ($z=0.3$) in
optical and IR bands.

##  2 Computing and fitting $k$-corrections

Here we follow the algorithm described in Chilingarian & Zolotukhin (2012): we
built a sample of high-quality photometric measurements covering the desired
redshift range and fitted them using a linear combination of galaxy templates
(see Fig. 1, left) produced by the non-negative matrix inversion and used in
the kcorrect package (Blanton & Roweis 2007). We also took into account
internal dust extinction inside galaxies by fitting the $e(B-V)$ value.

Our input photometric dataset was extracted as a subset of the RCSEDv2 catalog
with the most accurate photometric optical/IR data from the following surveys:
GALEX (near-UV; Martin et al. 2005), SDSS (Abazajian et al. 2009), DESI Legacy
Surveys (Dey et al. 2019), Dark Energy Survey (Abbott et al. 2021), UKIDSS
(Lawrence et al. 2007), CatWISE (Eisenhardt et al. 2020). The datasets were
retrieved using publicly available Virtual Observatory access services. Having
the best-fitting results at hand we then computed restframe fluxes for the
very same templates and derived $k$-corrections.

Then we explored the derived $k$-corrections in the ($z-color-k_{corr}$) 3D
parameter space and selected the appropriate degrees of the 2D fitting
polynomial. An example of a 3D distribution for $k_{corr}(g\rightarrow u)$ is
shown in Fig. 1 (right).

Then we fitted scattered datasets and derived the coefficients of the best-
fitting surfaces. However, this approach being applied directly to
intermediate-redshift data leads to poor quality of the solution because of a
non-uniform redshift distribution of galaxies in the redshift–color parameter
space: a densely populated area of the parameter space will dominate the
$\chi^{2}$ value causing systematic offsets in the sparsely populated regions
usually located close to the edges of the parameter space. To tackle this
issue, instead of fitting full scattered datasets, we first applied a two-
dimensional binning on a fine grid (e.g. 0.02 in redshift and 0.015–0.03 mag
in color depending on the band) and used the median values of $k$-corrections
inside each bin in the fitting procedure. We excluded from the fitting
procedure the bins where a number of data points was below a certain threshold
($N=15$). We also slightly modified the polynomial fitting procedure compared
to that used in Chilingarian et al. (2010); Chilingarian & Zolotukhin (2012)
because there we fixed a global offset (0th order coefficient) to zero using
the fact that $k_{corr}(z=0)=0$ by definition. Here, because we compute cross-
band $k$-corrections, this assumption is not valid and should not be used.

To evaluate the quality of analytic approximations, we then computed the best-
fitting $k$-correction values for every individual galaxy and analyzed the
fitting residuals. Fig. 2 presents examples of the computed $k$-corrections vs
redshift with a color-coded observed color used to perform the fitting. Lower
panels display the residuals between the analytic approximation and measured
values (bold black line) and r.m.s. of the fitting residuals (dotted lines).

##  3 Results and implications

We computed polynomial approximations of cross-band $k$-corrections in UV,
optical and IR broad-band filters as functions of redshift and observed
colours for galaxies at redshifts $z=0.3$, $z=0.5$ and $z=1.0$. We also
computed approximations of WISE $W1$ and $W2$ $k$-corrections at low
redshifts, which were not available in the past. The coefficients will be
integrated into an upgraded version of the $k$-corrections calculator
(http://kcor.sai.msu.ru/) and after a thorough testing and validation will be
supplied to the developer of topcat to be included in one of the next releases
of the tool.

We use these approximations in RCSEDv2 (https://rcsed2.voxastro.org/), the
second version of RCSED that is substantially extended to higher redshifts and
also contains WISE photometry for over 4 million galaxies. The crucial
importance of accurate computation of $k$-corrections is illustrated by the
fact that the measured width of the red sequence in the $M_{r}-(g-r)$ color
space (and the width of the universal UV-optical color–color–magnitude
relation in the red end; see Chilingarian & Zolotukhin 2012) is $0.045$ mag
and the intrinsic width is probably even narrower. This important property of
passive galaxies is used to select rare compact elliptical (Chilingarian &
Zolotukhin 2015) and low-mass post-starburst galaxies (Grishin et al. 2021) as
outliers from the relations. Such selection techniques would fail if
$k$-correction values are biased.

The next step is to compute analytic approximations of $k$-corrections for
active galactic nuclei (AGN) and quasars. This task is, however, much more
complex. An AGN host galaxy might have a substantial flux contribution from
the accretion disk around the AGN to the total flux in the optical, UV, and
mid-IR bands even for relatively low-mass central black holes if they happen
to accrete close to the Eddington limit (Chilingarian et al. 2018). This
contribution is known to correlate with the H$\alpha$ (and H$\beta$) flux in
the broad-line component, which can be measured directly from spectra.
Therefore, the broad-line H$\alpha$ flux is an obvious choice as an additional
fitting parameter.

### Acknowledgments

This project is supported by the RScF grant 19-12-00281 and the
Interdisciplinary Scientific and Educational School of Moscow University
“Fundamental and Applied Space Research”.

## References

  * Abazajian et al. (2009) Abazajian, K. N., et al. 2009, ApJS, 182, 543-558. 0812.0649
  * Abbott et al. (2021) Abbott, T. M. C., et al. 2021, ApJS, 255, 20. 2101.05765
  * Blanton & Roweis (2007) Blanton, M. R., & Roweis, S. 2007, AJ, 133, 734. astro-ph/0606170
  * Chilingarian & Zolotukhin (2015) Chilingarian, I., & Zolotukhin, I. 2015, Science, 348, 418. 1504.06990
  * Chilingarian et al. (2018) Chilingarian, I. V., et al. 2018, ApJ, 863, 1. 1805.01467
  * Chilingarian et al. (2010) Chilingarian, I. V., Melchior, A.-L., & Zolotukhin, I. Y. 2010, MNRAS, 405, 1409. 1002.2360
  * Chilingarian & Zolotukhin (2012) Chilingarian, I. V., & Zolotukhin, I. Y. 2012, MNRAS, 419, 1727. 1102.1159
  * Chilingarian et al. (2017) Chilingarian, I. V., et al. 2017, ApJS, 228, 14. 1612.02047
  * Dey et al. (2019) Dey, A., et al. 2019, AJ, 157, 168. 1804.08657
  * Eisenhardt et al. (2020) Eisenhardt, P. R. M., et al. 2020, ApJS, 247, 69. 1908.08902
  * Grishin et al. (2021) Grishin, K. A., et al. 2021, Nature Astronomy. 2111.01140
  * Lawrence et al. (2007) Lawrence, A., et al. 2007, MNRAS, 379, 1599. astro-ph/0604426
  * Martin et al. (2005) Martin, D. C., et al. 2005, ApJ, 619, L1. astro-ph/0411302
  * Taylor (2005) Taylor, M. B. 2005, in Astronomical Data Analysis Software and Systems XIV, edited by P. Shopbell, M. Britton, & R. Ebert, vol. 347 of Astronomical Society of the Pacific Conference Series, 29


11institutetext: Arizona State University, Tempe AZ 85281, USA 11email:
<EMAIL_ADDRESS>
# UPREVE: An End-to-End Causal Discovery Benchmarking System††thanks: This
work is supported through an NSF grant #2200140 “PIPP Phase I: Predicting
Emergence in Multidisciplinary Pandemic Tipping-points (PREEMPT)”and by the US
Army Corps of Engineers “Engineering With Nature Initiative” through
Cooperative Ecosystem Studies Unit Agreement #W912HZ-21-2-0040.

Suraj Jyothi Unni  Paras Sheth  Kaize Ding  Huan Liu  K. Selçuk Candan

###### Abstract

Discovering causal relationships in complex socio-behavioral systems is
challenging but essential for informed decision-making. We present Upload,
PREprocess, Visualize, and Evaluate (UPREVE), a user-friendly web-based
graphical user interface (GUI) designed to simplify the process of causal
discovery. UPREVE allows users to run multiple algorithms simultaneously,
visualize causal relationships, and evaluate the accuracy of learned causal
graphs. With its accessible interface and customizable features, UPREVE
empowers researchers and practitioners in social computing and behavioral-
cultural modeling (among others) to explore and understand causal
relationships effectively. Our proposed solution aims to make causal discovery
more accessible and user-friendly, enabling users to gain valuable insights
for better decision-making.

###### Keywords:

Causal Discovery Visualization Structure Learning

##  1 Introduction

Discovering causal relationships in complex socio-behavioral systems is
challenging but essential for informed decision-making:

  * •

Motivating application $\\#1$: Pandemic Preparedness: Even though they involve
biological (such as viruses, vaccines) and physical (such as PPE) components,
pandemics are largely socio-behavioral phenomena. Therefore, capturing the
spatiotemporal evolution of pandemics at different spatial scales through
human interactions, assessing the effects of travel controls during the early
epidemic phase, predicting the effects of school closures in mitigating
disease spread, assessing the impact of social distancing and vaccination
strategies, and identifying the effects of private responses to evolving
disease threats, all require an understanding of the fundamental relationships
among social, behavioral, and economic factors impacting human and community
behavior, behavior change, in the context of other factors impacting disease
spread.

  * •

Motivating application $\\#2$: Water Sustainability: Even though they involve
natural (such as rivers, lakes) and built (such as dams, canals, reservoirs)
components, water sustainability is a largely socio-behavioral phenomenon. The
amount of water individuals and communities use for domestic, industrial, and
agricultural applications can substantially impact water availability. In
particular, land use practices such as urban development, deforestation, and
agriculture can impact water sustainability through increased demand,
pollution, and contamination. Therefore, responding to water sustainability
challenges requires understanding the fundamental relationships among social,
behavioral, economic factors impacting individual and collective behavior and
behavior change in the context of other factors impacting water
sustainability.

In these and other scenarios, causal relationships can help researchers
understand the underlying mechanisms that drive social and behavioral
phenomena and help design effective policies and interventions. The improved
predictive power through causally-informed reasoning can help forecast the
potential outcomes of interventions or policy changes. Through counterfactual
reasoning, decision-makers can better assess the impacts of those
interventions on the underlying human-centered systems.

Existing causal discovery toolbox libraries, such as causallearn [4] and
causal discovery toolbox [3], often lack user-friendliness due to their
terminal-based interfaces. These libraries may also have limited algorithm and
metric options, hindering their practical utility. To address these
limitations, we propose Upload, PREprocess, Visualize, and Evaluate
(UPREVE111UPREVE is available under MIT License at
https://github.com/surajjunni/UPREVE.), a graphical user interface (GUI) for
causal discovery. UPREVE aims to provide a user-friendly environment for
algorithm selection, data visualization, and result evaluation by
incorporating various state-of-the-art algorithms and metrics. In comparison
to CastleBoard [9], an existing GUI, UPREVE offers the advantage of running
multiple algorithms simultaneously on a single dataset, along with data
preprocessing capabilities. UPREVE also provides a wider range of
visualization options, including heatmaps and directed graphs, allowing users
to gain deeper insights into causal relationships. Additionally, UPREVE
supports multiple users, fostering collaboration and concurrent usage. By
introducing UPREVE, we aim to overcome the limitations of existing libraries
and offer a comprehensive solution for efficient and insightful causal
discovery. The subsequent sections will delve into UPREVE’s modules, present a
case study using the Covertype dataset, analyze the results, discuss
limitations, and outline potential avenues for future development.

Figure 1: (a) Algorithm/Metric Upload Module,(b) Dataset Upload and Preprocess
Module Figure 2: (a) Algorithm Execution Module, (b) Metric Evaluation Module,
(c) Algorithm/Metric Upload Module

##  2 UPREVE Architecture

The UPREVE system facilitates the causal discovery and analysis of complex
datasets. It consists of several modules that interact with each other to
streamline the process of causal discovery. The following modules are integral
to the UPREVE architecture:

  * •

Dataset Upload and Preprocess Module allows users to upload CSV/XLSX datasets
into the UPREVE system. The module prompts the user to provide information
about the dataset described in the case study section. Additionally, the
module requires the user to provide ground truth data calculated by domain
experts in CSV format. This module supports datasets with column names in the
format $<$columnname$>$:$<$column type $>$, enabling proper identification of
variables.

  * •

Algorithm/Metric Upload Module enables users to upload scripts related to
causal algorithms and metric evaluation into the UPREVE system. Users can
upload pre-existing algorithms or create their own by uploading a zip file.
The zip file should include a config.json file specifying the algorithm’s
name, parameters, script language, and script path and a requirements.txt file
listing any necessary package dependencies. The module supports Python and R
scripts for algorithm execution. Similarly, metrics evaluation scripts can
also be uploaded in the same way.

  * •

Algorithm Execution Module executes causal discovery algorithms on the
uploaded dataset. It supports several cutting-edge causal discovery
algorithms([1],[2],[3],[5],[6],[7]) within the system.Users can select the
algorithms they wish to execute and adjust their configurations suitably.
Additionally, users can choose the dataset on which the algorithms will be
applied. Upon submitting the selection, the module generates results that can
be downloaded, visualized, or evaluated using appropriate metrics if a ground
truth is available. The console log view on the same page displays all
relevant logs and error messages related to the execution process.
Visualization Module enables users to observe and interact with the outcomes
of the executed algorithms. Users have various graphical options, including
directed graphs and heat maps to visualize the inferred causal graph. The
module provides metadata for each visualization, such as node names, the
number of edges, and the graph’s density.Users can download the visualized
data for further analysis.

  * •

Metrics Evaluation Module allows users to compare the performance of different
algorithms for determining causal relationships. The module supports both pre-
existing and custom metrics. Currently, it supports five benchmark metrics:
area over curve, true positive rate, structural hamming distance, structural
intervention distance, and false positive rate. The module presents the
evaluation findings in a tabular format, allowing users to select the desired
metric and view the corresponding results.

Integrating these modules, the UPREVE system provides a comprehensive approach
to causal discovery. It automates algorithm selection, provides visualization
capabilities for exploring causal relationships, and offers metric evaluation
to compare algorithm performance. This architecture empowers researchers and
practitioners from various fields to efficiently analyze complex datasets and
gain valuable insights for decision-making.

##  3 Case Study

This case study analyzes a forest cover-type dataset using the UPREVE system.
The dataset comprises 581,012 instances and consists of 54 columns of data,
including quantitative variables, such as elevation, aspect, slope, distances
to hydrology, roadways, fire points, and binary wilderness area and soil type
designations. To apply the UPREVE system to the forest cover type case study,
we followed a systematic approach that involved several modules.

###  3.1 Dataset Upload and Preprocess Module

The first step is to upload the dataset to the UPREVE system. The dataset is
in CSV format. The UPREVE system automatically detects the column names and
data types. The module asks for information about the dataset, such as its
name, type, and problem. The dataset name for this data is covertype. The type
can be user or benchmark. The problem can be classification, forecasting, or
none. The problem types list will be increased in the future. The module then
asks for ground truth, calculated by domain experts and in CSV format. There
is one more option column called ”order” for ordinal, but we do not need it
because there is no ordinal column in this dataset.

###  3.2 Algorithm/Metric Upload Module

For the Algorithm/Metric Upload Module, we assume that all the required
algorithms and metrics for the case study have already been uploaded into the
system. These algorithms and metrics follow the same upload procedure as
outlined in Section 2.

###  3.3 Algorithm Execution Module

Next we move on to the execution phase, where we experiment with six
algorithms (PC[6], FCI [7], VARLiNGAM [2], GIN [8], GES [1], and ICALiNGAM
[5]) with predefined configurations. These algorithms are uploaded in the same
way as mentioned in Section 2. In the ”home” section, we have the option of
selecting these algorithms with their configuration, and after that, we have
the option of selecting the dataset, which in this case will be covertype.
After that, all six algorithms will be run on the covertype dataset. If there
is an error when running, it will be visible in the console log, which is
available below this module. Once completed, the system displays three
options: visualize, metric evaluation, and download the result. The first two
will be covered in later sections.

###  3.4 Visualization Module

The Visualization Module in the UPREVE system enables the visualization of the
results obtained from the causal discovery algorithms. Two visualization
options are available: a directed graph representing the causal relationships
between the variables and a heat map illustrating the correlation among the
variables in the Forest Cover Type dataset. Users can download the
visualization data for further analysis and exploration. For example, when
visualizing the directed graph generated by applying the PC algorithm to the
Forest Cover Type dataset, the visualization displays node names, the number
of edges (34), the graph’s density (0.31), and a table that lists the causes
of each node as shown in Figure 2b. In the case of the node Elevation:numeric,
the contributing nodes include Horiz-hydr:numeric, Shade9:numeric,
Shade12:numeric, and Shade3:numeric. Similar visualization data and causal
relationships can be obtained for the other five algorithms in the UPREVE
system.

###  3.5 Metrics Evaluation Module

This module efficiently calculates essential metrics for each algorithm, such
as the area under the curve, true positive rate, structural Hamming distance,
structural intervention distance, and false positive rate. Subsequently, a
comprehensive and detailed report is generated, summarizing the outcomes of
the metric evaluation. In the case of the PC algorithm and its structural
intervention distance, the evaluation reveals a value of 22 (illustrated in
Figure 2c). This signifies that the current configuration employed for the PC
algorithm is suboptimal for the given dataset. Consequently, it strongly
suggests the necessity of reconfiguring the algorithm or exploring alternative
algorithms to enhance performance.

##  4 Conclusion and Future Directions

This paper introduces UPREVE, an interactive graphical user interface (GUI)
designed to streamline the causal discovery process for socio-behavioral
research and decision making. UPREVE offers a unified system that allows users
to execute various causal discovery algorithms on datasets compatible with R
and Python. The GUI also provides visualization capabilities to explore the
interactions between variables based on algorithm results, facilitating a
better understanding of causal relationships. Additionally, UPREVE can
identify similarities among algorithm outcomes. A session-based feature will
be incorporated into UPREVE in future development to enable users to track
their previous results conveniently. Furthermore, the aim is to explore and
experiment with additional functionalities that can provide users with more
insights related to the results of causal discovery algorithms. These
enhancements will enhance the usability and effectiveness of UPREVE,
empowering users in their causal discovery endeavors.

## References

  * [1] Chickering, D.M.: Optimal structure identification with greedy search. J. Mach. Learn. Res. 3(null), 507–554 (mar 2003). https://doi.org/10.1162/153244303321897717, https://doi.org/10.1162/153244303321897717
  * [2] Hyvärinen, A., Zhang, K., Shimizu, S., Hoyer, P.: Estimation of a structural vector autoregression model using non-gaussianity. Journal of Machine Learning Research 11, 1709–1731 (May 2010)
  * [3] Kalainathan, D., Goudet, O.: Causal discovery toolbox: Uncover causal relationships in python (2019)
  * [4] Py-Why: causal-learn: Causal discovery for python. https://github.com/py-why/causal-learn (2022)
  * [5] Shimizu, S., Hoyer, P.O., Hyvärinen, A., Kerminen, A.: A linear non-gaussian acyclic model for causal discovery. J. Mach. Learn. Res. 7, 2003–2030 (dec 2006)
  * [6] Spirtes, P., Glymour, C.N., Scheines, R.: Causation, prediction, and search. MIT press (2000)
  * [7] Spirtes, P., Meek, C., Richardson, T.S.: Causal inference in the presence of latent variables and selection bias. CoRR abs/1302.4983 (2013), http://arxiv.org/abs/1302.4983
  * [8] Xie, F., Cai, R., Huang, B., Glymour, C., Hao, Z., Zhang, K.: Generalized independent noise condition for estimating linear non-gaussian latent variable graphs. CoRR abs/2010.04917 (2020), https://arxiv.org/abs/2010.04917
  * [9] Zhang, K., Zhu, S., Kalander, M., Ng, I., Ye, J., Chen, Z., Pan, L.: gcastle: A python toolbox for causal discovery (2021)