\documentclass{article}
\usepackage[utf8]{inputenc}
% Used in the explanation text
\usepackage{hyperref}
\hypersetup{
colorlinks = true,
citecolor = {blue},
urlcolor = {blue},
}
% Used by the template
\usepackage{setspace}
\usepackage{changepage} % to adjust margins
\usepackage[breakable]{tcolorbox}
\usepackage{float} % for tables inside tcolorbox https://tex.stackexchange.com/a/274342
\usepackage{enumitem}
\title{A template for model cards}
\author{Christian Garbin}
\date{July 2021}
\begin{document}
\maketitle
\section{Model cards}
\href{https://arxiv.org/abs/1810.03993}{Model cards} are ``short documents accompanying trained machine learning models that provide benchmarked evaluation in a variety of conditions, such as across different cultural, demographic, or phenotypic groups \ldots and intersectional groups \ldots that are relevant to the intended application domains. Model cards also disclose the context in which models are intended to be used, details of the performance evaluation procedures, and other relevant information.''
Model cards were motivated by systematic bias in commercial applications that were discovered only after the models were released. To counter that, the authors ``advocate for measures of model performance that contain quantitative evaluation results to be broken down by individual cultural, demographic, or phenotypic groups, domain-relevant conditions, and intersectional analysis combining two (or more) groups and conditions.'' The emphasis on ethic aspects of the measurements is a distinguishing feature of model cards, compared to other proposals to document models.
\section{Template}
% Each section is supposed to be brief, in the form of a bullet list.
% This environment formats the lists in each model card section in a compact format to help
% the card fit into the recommended "one to two pages".
\newenvironment{mcsection}[1]
{%
\textbf{#1}
% Reduce margins to use the space more effectively and help fit in the recommended "one to two pages"
% Use the bullet list format as shown in the model card paper to increase readability
\begin{itemize}[leftmargin=*,topsep=0pt,itemsep=-1ex,partopsep=1ex,parsep=1ex,after=\vspace{\medskipamount}]
}
{%
\end{itemize}
}
% Optional: reduce margins single line to fit in "one to two pages", as recommended
\begin{adjustwidth}{-60pt}{-30pt}
\begin{singlespace}
\tcbset{colback=white!10!white}
\begin{tcolorbox}[title=\textbf{Model Card - CheXNet},
breakable, sharp corners, boxrule=0.7pt]
% Change to a smaller, but still legible font size to help fit in the recommended "one to two pages"
\small{
Refer to section 4.1 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\begin{mcsection}{Model Details}
\item Detail 1...
\item Detail 2...
\end{mcsection}
Refer to section 4.2 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\begin{mcsection}{Intended Use}
\item Intended use 1...
\end{mcsection}
Refer to section 4.3 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\begin{mcsection}{Factors}
\item Factors 1...
\end{mcsection}
Refer to section 4.4 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\begin{mcsection}{Metrics}
\item Metrics 1....
\end{mcsection}
Refer to section 4.5 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\begin{mcsection}{Evaluation Data}
\item Evaluation data 1...
\end{mcsection}
Refer to section 4.6 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\begin{mcsection}{Training Data}
\item Training data 1...
\end{mcsection}
\pagebreak
Refer to section 4.8 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\begin{mcsection}{Ethical Considerations}
\item Ethical considerations 1....
\end{mcsection}
Refer to section 4.9 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\begin{mcsection}{Caveats and Recommendations}
\item Caveats and recommendations 1...
\end{mcsection}
Refer to section 4.7 of the \href{https://arxiv.org/abs/1810.03993}{model card paper } -- remove this line after filling in this section.
\textbf{Quantitative Analyses}
% Sample table inside tcolorbox
\begin{table}[H]
\centering
\small{
\begin{tabular}{lr}
Measurement 1 & 0.751 \\
Measurement 2 & 0.762 \\
Measurement 3 & 0.773 \\
Measurement 4 & 0.784 \\
Measurement average & 0.768 \\ \hline
\textbf{Model measurement} & \textbf{0.791} \\ \hline
\end{tabular} } \\
\caption[Short caption used in list of tables.]{\small{Longer caption to explain what the measurements are.}}
\end{table}
} % end font size change
\end{tcolorbox}
\end{singlespace}
\end{adjustwidth}
\end{document}