\documentclass[10pt, aspectratio=169, usenames, dvipsnames]{beamer}

\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{spy, external, intersections}
%\tikzexternalize[prefix=build/]

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{fillbetween}

\usepackage{listings}
\usepackage{subcaption}
\usepackage{bbm}
\usepackage{multirow}

\usepackage{xcolor}
%\usepackage[outputdir=build/]{minted}
\usepackage{minted}
\usemintedstyle{gruvbox-light}

%\definecolor{gruvbox-bg}{HTML}{282828}
\definecolor{gruvbox-bg}{HTML}{f2e5bc}

%
%
% Custom commands
%
%

\input{lib/latex-common/common.tex}
\pgfplotsset{colorscheme/rocket}

\newcommand{\res}{src/2025-05-08/res}

%
%
% CEL Template
%
%

\newcommand{\templates}{lib/cel-template}

\input{\templates/packages.tex}
\input{\templates/modifications.tex}
\input{\templates/makros_own.tex}

% % Change the way the overview is displayed
% \AtBeginSection[]
% {
%     \begin{frame}[t]
%         \frametitle{Overview}
%     \tableofcontents[sectionstyle=show/shaded,
%                      subsectionstyle=show/show/shaded,
%                      subsubsectionstyle=hide]
%     \end{frame}
% }
% \AtBeginSubsubsection[]{}
% \AtBeginSubsection[]{}

%
%
% Set up document
%
%

\title{HiWi Notes: Minimization of the Code Constraint Polynomial using
Homotopy Continuation Methods}
\subtitle{\small 08.05.2025}
\author{\vspace{1.5mm} Andreas Tsouchlos}
\date{ }

\institute{Karlsruhe Institute of Technology (KIT),
\\ Communications Engineering Lab (CEL) }

\tikzstyle{every node}=[font=\small]
\captionsetup[sub]{font=small}

%
%
% Document body
%
%

\begin{document}

\begin{frame}[plain]
    \maketitle
\end{frame}

\newcommand{\largecitereference}[1]
{\textcolor{kit-green100}{ \large \textbf{{[#1]}} }}

\begin{frame}
    \frametitle{The All-Zeros Assumption}

    \vspace*{-5mm}

    \begin{itemize}
        \item Previous results were generated using the all-zeros
            assumption
        \item To cancel out any numerical effects,
            subsequent results have been generated using randomly
            generated codewords
        \item Using randomly generated codewords paints a very different picture
    \end{itemize}

    \begin{figure}[H]
        \centering

        \begin{subfigure}[c]{0.48\textwidth}
            \centering

            \vskip 0pt
            \begin{tikzpicture}
                \begin{axis}[
                        width=\textwidth,
                        height=0.75\textwidth,
                        ylabel={FER (-\,-\,-), BER (---)},
                        ymode=log,
                        legend,
                        xlabel = {$Eb/N0$ (dB)},
                        legend pos= south west,
                        xmax=6
                    ]

                    \addplot+[black, densely dashed, mark=none, line width=1pt,
                    forget plot]
                    table[col sep=comma, x=SNR, y=FER, discard if
                    not={gamma}{0.05}]
                    {\res/bch_31_26_proximal.csv};
                    \addplot+[black, mark=none, line width=1pt]
                    table[col sep=comma, x=SNR, y=BER, discard if
                    not={gamma}{0.05}]
                    {\res/bch_31_26_proximal.csv};
                    \addlegendentry{Proximal decoding}

                    \addplot+[scol3, densely dashed, mark=none, line
                    width=1pt, forget plot]
                    table[col sep=comma, x=SNR, y=FER]
                    {\res/bch_31_26_hc_all_zeros.csv};
                    \addplot+[scol3, mark=none, line width=1pt]
                    table[col sep=comma, x=SNR, y=BER]
                    {\res/bch_31_26_hc_all_zeros.csv};
                    \addlegendentry{Hom. cont. - all zeros}

                    \addplot+[scol1, densely dashed, mark=none, line
                    width=1pt, forget plot]
                    table[col sep=comma, x=SNR, y=FER]
                    {\res/bch_31_26_hc_random.csv};
                    \addplot+[scol1, mark=none, line width=1pt]
                    table[col sep=comma, x=SNR, y=BER]
                    {\res/bch_31_26_hc_random.csv};
                    \addlegendentry{Hom. cont. - rand. cw.}

                \end{axis}
            \end{tikzpicture}

            \caption{BCH(31,26) Code}
        \end{subfigure}%
        \begin{subfigure}[c]{0.48\textwidth}
            \centering

            \vspace*{-17mm}

            \begin{tabular}{rl|ccccc}
                & Parameter & Value \\ \hline
                $n_\text{iter}$ & for homotopy continuation & 20 \\
                $n_\text{iter}$ & for Newton corrector      & 5 \\
                $\delta_\text{max}$ & for Newton corrector      & 0.01 \\
                $\Delta s$ & for Euler predictor       & 0.05 \\
                $n_\text{retries}$ & for Euler predictor       & 5
            \end{tabular}

            \bigskip
            \smallskip
        \end{subfigure}
    \end{figure}
\end{frame}

\begin{frame}
    \frametitle{Fixed Point Homotopy}

    \vspace*{-6mm}

    \begin{itemize}
        \item Previous results were generated using the Newton homotopy
            \begin{gather*}
                G(\bm{x}) = F(x) - F(\bm{y}) \hspace{5mm} \Rightarrow
                \hspace{5mm} H(\bm{x}) = F(\bm{x}) - (1 - t) F(\bm{y})
            \end{gather*}
        \item We could instead try the fixed point homotopy
            \begin{gather*}
                G(\bm{x}) = (\bm{x} - \bm{y}) \hspace{5mm}
                \Rightarrow \hspace{5mm} H(\bm{x}) = (1-t)(\bm{x} -
                \bm{y}) + t F(\bm{x})
            \end{gather*}
    \end{itemize}

    \vspace*{-2mm}

    \begin{figure}[H]
        \centering

        \begin{subfigure}[c]{0.48\textwidth}
            \centering

            \vskip 0pt
            \begin{tikzpicture}
                \begin{axis}[
                        width=\textwidth,
                        height=0.72\textwidth,
                        ylabel={FER (-\,-\,-), BER (---)},
                        ymode=log,
                        legend,
                        xlabel = {$Eb/N0$ (dB)},
                        legend pos= south west,
                        xmax=6,
                        ymin = 0.1
                    ]

                    \addplot+[scol1, densely dashed, mark=none, line
                    width=1pt, forget plot]
                    table[col sep=comma, x=SNR, y=FER]
                    {\res/bch_31_26_hc_fixed_point_random.csv};
                    \addplot+[scol1, mark=none, line width=1pt]
                    table[col sep=comma, x=SNR, y=BER]
                    {\res/bch_31_26_hc_fixed_point_random.csv};
                    \addlegendentry{Hom. cont. - fixed point, rand. cw.}

                \end{axis}
            \end{tikzpicture}

            \vspace*{-2mm}
            \caption{BCH(31,26) Code}
        \end{subfigure}%
        \begin{subfigure}[c]{0.48\textwidth}
            \centering

            \vspace*{-17mm}

            \begin{tabular}{rl|ccccc}
                & Parameter & Value \\ \hline
                $n_\text{iter}$ & for homotopy continuation & 20 \\
                $n_\text{iter}$ & for Newton corrector      & 5 \\
                $\delta_\text{max}$ & for Newton corrector      & 0.01 \\
                $\Delta s$ & for Euler predictor       & 0.05 \\
                $n_\text{retries}$ & for Euler predictor       & 5
            \end{tabular}

            \bigskip
            \smallskip
        \end{subfigure}
    \end{figure}
\end{frame}

\begin{frame}
    \frametitle{Parameter Exploration}

    \vspace*{-7mm}

    \begin{figure}
        \centering
        \begin{subfigure}[c]{0.48\textwidth}
            \centering
            \begin{itemize}
                \item Fixed parameters:
                    \begin{tabular}{rl|c}
                        & Parameter & Value \\ \hline
                        $E_\text{b} / N_0$ &
                        & $\SI{6}{dB}$ \\
                        $n_\text{iter}$    & for homotopy continuation & 200 \\
                        $n_\text{iter}$    & for Newton corrector      & 20 \\
                        $n_\text{retries}$ & for Euler predictor       & 20
                    \end{tabular}
                \item Random codewords, Newton homotopy, BCH(31, 26) code
                \item Low decoding failure rate (DFR) $\rightarrow$
                    We do often reach codewords, just not the correct ones
            \end{itemize}
        \end{subfigure} \hfill %
        \begin{subfigure}[c]{0.48\textwidth}
            \centering
            \vskip 0pt
            \scalebox{0.7}{
                % tex-fmt: off
                \begin{tabular}{c|c|ccccccc}
                    DFR && \multicolumn{7}{c}{Euler step size}\\\hline
                        && 0.001 & 0.005 & 0.01 & 0.05 & 0.1 & 0.5 & 1.0 \\ \hline
                    \parbox[t]{2mm}{\multirow{7}{*}{\rotatebox[origin=c]{90}{Newtown threshold}}}
                    & 0.001 & 0.070 & 0.055 & 0.085 & 0.070 & 0.075 & 0.050 & 0.060 \\
                    & 0.005 & 0.055 & 0.075 & 0.060 & 0.070 & 0.100 & 0.070 & 0.050 \\
                    & 0.01  & 0.065 & 0.060 & 0.075 & 0.085 & 0.095 & 0.040 & 0.045 \\
                    & 0.05  & 0.090 & 0.080 & 0.085 & 0.085 & 0.045 & 0.065 & 0.055 \\
                    & 0.1   & 0.100 & 0.085 & 0.045 & 0.080 & 0.065 & 0.055 & 0.075 \\
                    & 0.5   & 0.070 & 0.075 & 0.125 & 0.055 & 0.070 & 0.055 & 0.090 \\
                    & 1.0   & 0.055 & 0.095 & 0.060 & 0.050 & 0.055 & 0.075 & 0.055 \\
                \end{tabular}
                % tex-fmt: on
            }
        \end{subfigure}\\[2mm]
        \begin{subfigure}[t]{0.48\textwidth}
            \centering
            \scalebox{0.7}{
                % tex-fmt: off
                \begin{tabular}{c|c|ccccccc}
                    FER && \multicolumn{7}{c}{Euler step size}\\\hline
                        && 0.001 & 0.005 & 0.01 & 0.05 & 0.1 & 0.5 & 1.0 \\ \hline
                    \parbox[t]{2mm}{\multirow{7}{*}{\rotatebox[origin=c]{90}{Newtown threshold\footnotemark}}}
                    & 0.001 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \\
                    & 0.005 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \\
                    & 0.01  & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \\
                    & 0.05  & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \\
                    & 0.1   & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \\
                    & 0.5   & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \\
                    & 1.0   & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 & 1.0 \\
                \end{tabular}
                % tex-fmt: on
            }
        \end{subfigure} \hfill %
        \begin{subfigure}[t]{0.48\textwidth}
            \centering
            \scalebox{0.7}{
                % tex-fmt: off
                \begin{tabular}{c|c|ccccccc}
                    BER && \multicolumn{7}{c}{Euler step size}\\\hline
                        && 0.001 & 0.005 & 0.01 & 0.05 & 0.1 & 0.5 & 1.0 \\ \hline
                    \parbox[t]{2mm}{\multirow{7}{*}{\rotatebox[origin=c]{90}{Newtown threshold}}}
                    & 0.001 & 0.497 & 0.496 & 0.509 &  0.495 & 0.508 & 0.495 & 0.503 \\
                    & 0.005 & 0.509 & 0.503 & 0.491 &  0.502 & 0.506 & 0.502 & 0.502 \\
                    & 0.01  & 0.498 & 0.492 & 0.520 &  0.509 & 0.500 & 0.502 & 0.504 \\
                    & 0.05  & 0.503 & 0.499 & 0.507 &  0.494 & 0.492 & 0.500 & 0.506 \\
                    & 0.1   & 0.499 & 0.499 & 0.500 &  0.508 & 0.502 & 0.488 & 0.507 \\
                    & 0.5   & 0.510 & 0.503 & 0.510 &  0.495 & 0.507 & 0.515 & 0.501 \\
                    & 1.0   & 0.502 & 0.506 & 0.506 &  0.502 & 0.500 & 0.505 & 0.500 \\
                \end{tabular}
                % tex-fmt: on
            }
        \end{subfigure}
    \end{figure}

    \footnotetext{``Newton threshold'' refers to the threshold used
    for the convergence criterion of the newton corrector}
\end{frame}

\begin{frame}etwas
    \frametitle{Tentative Conclusion}

    \vspace*{-5mm}

    \begin{itemize}
        \item Original motivation
            \begin{itemize}
                \item Novel decoding technique
                \item Possible decoding guarantees due to homotopy
                    continuation behavior
            \end{itemize}
        \item Simulation results
            \begin{itemize}
                \item Implementing a working decoder has proven
                    difficult, irrespective of the parameters / code chosen
                \item The homotopy continuation implementation itself
                    seems to be working, judging by the DFR
                \item There are two alternatives that both describe
                    the observed results:
                    \begin{itemize}
                        \item We always converge to the same
                            codeword - error rates are due to
                            Tx codewords being random
                        \item We randomly converge to codewords that
                            have nothing to do with what was sent
                    \end{itemize}
            \end{itemize}
        \item Problems
            \begin{itemize}
                \item It is not obvious how we can apply the
                    theory from homotopy continuation to the
                    decoder
                \item Decoding algorithm seems too comput. expensive (matrix
                    inversion necessary for each iteration)
            \end{itemize}
        \item Conclusion
            \begin{itemize}
                \item There is no hard evidence yet that a decoder
                    based on homotopy continuation can't work
                \item However, pursuing this line of research doesn't seem
                    particularly promising, due to missing motivation
                    and missing evidence it can work at all
            \end{itemize}
    \end{itemize}
\end{frame}

\end{document}
