Fix homotopy definition; Fix simulation results

This commit is contained in:
Andreas Tsouchlos 2025-05-12 23:06:02 +02:00
parent 1499c65525
commit 4b3d39e605
2 changed files with 260 additions and 208 deletions

View File

@ -4,7 +4,7 @@ all:
latexmk src/2024-12-03/presentation.tex latexmk src/2024-12-03/presentation.tex
mv build/presentation.pdf build/presentation_2024-12-03.pdf mv build/presentation.pdf build/presentation_2024-12-03.pdf
latexmk src/2025-01-07/presentation.tex latexmk src/2025-03-28/presentation.tex
mv build/presentation.pdf build/presentation_2025-01-07.pdf mv build/presentation.pdf build/presentation_2025-03-28.pdf
clean: clean:
rm -rf build rm -rf build

View File

@ -9,7 +9,6 @@
\pgfplotsset{compat=newest} \pgfplotsset{compat=newest}
\usepgfplotslibrary{fillbetween} \usepgfplotslibrary{fillbetween}
\usepackage{listings} \usepackage{listings}
\usepackage{subcaption} \usepackage{subcaption}
\usepackage{bbm} \usepackage{bbm}
@ -22,27 +21,23 @@
%\definecolor{gruvbox-bg}{HTML}{282828} %\definecolor{gruvbox-bg}{HTML}{282828}
\definecolor{gruvbox-bg}{HTML}{f2e5bc} \definecolor{gruvbox-bg}{HTML}{f2e5bc}
% %
% %
% Custom commands % Custom commands
% %
% %
\input{lib/latex-common/common.tex} \input{lib/latex-common/common.tex}
\pgfplotsset{colorscheme/rocket} \pgfplotsset{colorscheme/rocket}
\newcommand{\res}{src/2025-03-28/res} \newcommand{\res}{src/2025-03-28/res}
% %
% %
% CEL Template % CEL Template
% %
% %
\newcommand{\templates}{lib/cel-template} \newcommand{\templates}{lib/cel-template}
\input{\templates/packages.tex} \input{\templates/packages.tex}
@ -62,44 +57,38 @@
% \AtBeginSubsubsection[]{} % \AtBeginSubsubsection[]{}
% \AtBeginSubsection[]{} % \AtBeginSubsection[]{}
% %
% %
% Set up document % Set up document
% %
% %
\title{HiWi Notes: Minimization of the Code Constraint Polynomial using \title{HiWi Notes: Minimization of the Code Constraint Polynomial using
Homotopy Continuation Methods} Homotopy Continuation Methods}
\subtitle{\small 07.01.2025} \subtitle{\small 28.03.2025}
\author{\vspace{1.5mm} Andreas Tsouchlos} \author{\vspace{1.5mm} Andreas Tsouchlos}
\date{ } \date{ }
\institute{Karlsruhe Institute of Technology (KIT), \institute{Karlsruhe Institute of Technology (KIT),
\\ Communications Engineering Lab (CEL) } \\ Communications Engineering Lab (CEL) }
\tikzstyle{every node}=[font=\small] \tikzstyle{every node}=[font=\small]
\captionsetup[sub]{font=small} \captionsetup[sub]{font=small}
% %
% %
% Document body % Document body
% %
% %
\begin{document} \begin{document}
\begin{frame}[plain] \begin{frame}[plain]
\maketitle \maketitle
\end{frame} \end{frame}
\newcommand{\largecitereference}[1] \newcommand{\largecitereference}[1]
{\textcolor{kit-green100}{ \large \textbf{{[#1]}} }} {\textcolor{kit-green100}{ \large \textbf{{[#1]}} }}
% %
% - The decoding problem as the search for a solution of polynomial system % - The decoding problem as the search for a solution of polynomial system
@ -108,7 +97,6 @@
% - Implementation % - Implementation
% %
% TODO: Check example homotopy % TODO: Check example homotopy
% TODO: Add the name of the homotopy construction (t-1)G + tF and note that it % TODO: Add the name of the homotopy construction (t-1)G + tF and note that it
% is not the only possibility % is not the only possibility
@ -117,18 +105,26 @@
\begin{minipage}[c]{0.65\textwidth} \begin{minipage}[c]{0.65\textwidth}
\begin{itemize} \begin{itemize}
\item Goal: Solve system of equations $F(\bm{x}) = \bm{0}, \hspace{2mm} F:\mathbb{R}^n \rightarrow \mathbb{R}^n$ \item Goal: Solve system of equations $F(\bm{x}) = \bm{0},
\item Problem: Depending on $F$, solving this directly may be difficult \hspace{2mm} F:\mathbb{R}^n \rightarrow \mathbb{R}^n$
\item Problem: Depending on $F$, solving this directly
may be difficult
\item Solution: Define \emph{homotopy function} $H(\bm{x}, t)$ with \item Solution: Define \emph{homotopy function} $H(\bm{x}, t)$ with
\begin{gather*} \begin{gather*}
H(\bm{x}, 0) = G(\bm{x}), \hspace{5mm} H(\bm{x}, 1) = F(\bm{x}) H(\bm{x}, 0) = G(\bm{x}), \hspace{5mm} H(\bm{x},
,\end{gather*} 1) = F(\bm{x})
i.e., a deformation between two systems $G(\bm{x})$ and $F(\bm{x})$ ,
\end{gather*}
i.e., a deformation between two systems $G(\bm{x})$
and $F(\bm{x})$
(where the zeros of $G$ can be easily obtained); E.g., (where the zeros of $G$ can be easily obtained); E.g.,
\begin{gather*} \begin{gather*}
H(\bm{x}, t) = (t-1)G(\bm{x}) + tF(\bm{x}) H(\bm{x}, t) = (t-1)G(\bm{x}) + tF(\bm{x})
.\end{gather*} .
Then, compute $(\bm{x}_0, 0)$ such that $G(\bm{x}_0) = \bm{0}$ and trace path to $(\bm{x}_1, 1)$ with $F(\bm{x}_1) = \bm{0}$ \end{gather*}
Then, compute $(\bm{x}_0, 0)$ such that $G(\bm{x}_0) =
\bm{0}$ and trace path to $(\bm{x}_1, 1)$ with
$F(\bm{x}_1) = \bm{0}$
\end{itemize} \end{itemize}
\vspace{5mm} \vspace{5mm}
@ -266,7 +262,6 @@
\end{minipage} \end{minipage}
\end{frame} \end{frame}
\begin{frame} \begin{frame}
\frametitle{Path Tracing} \frametitle{Path Tracing}
@ -275,10 +270,13 @@
\begin{itemize} \begin{itemize}
\item Reminder: We are trying to trace the solution curve \item Reminder: We are trying to trace the solution curve
$H(\bm{x}, t) = \bm{0}$ from $t = 0$ to $t = 1$ $H(\bm{x}, t) = \bm{0}$ from $t = 0$ to $t = 1$
\item We can express the solution curve as a system of differential equations \citereference{CL15}: \item We can express the solution curve as a system of
differential equations \citereference{CL15}:
\begin{align*} \begin{align*}
DH(\bm{y}(s))\cdot \dot{\bm{y}}(s) &= 0 \\ DH(\bm{y}(s))\cdot \dot{\bm{y}}(s) &= 0 \\
\text{det}\left(\begin{array}{c} DH(\bm{y}(s)) \\ \dot{\bm{y}}(s)\end{array}\right) &= \sigma_0 \\ \text{det}\left(
\begin{array}{c} DH(\bm{y}(s)) \\ \dot{\bm{y}}(s)
\end{array}\right) &= \sigma_0 \\
\lVert \dot{\bm{y}}(s) \rVert &= 1 \\ \lVert \dot{\bm{y}}(s) \rVert &= 1 \\
\bm{y}(0) &= (\bm{x}_0, 0) \bm{y}(0) &= (\bm{x}_0, 0)
,% ,%
@ -290,8 +288,11 @@
predictor-corrector scheme, e.g., Euler's predictor and Newton's predictor-corrector scheme, e.g., Euler's predictor and Newton's
corrector \citereference{CL15}: corrector \citereference{CL15}:
\begin{align*} \begin{align*}
\hat{\bm{y}} &= \bm{y}_0 + \Delta s \cdot \sigma \cdot {\bm{y}}(\bm{s})\\ \hat{\bm{y}} &= \bm{y}_0 + \Delta s \cdot \sigma \cdot
\bm{y} &= \mathcal{N}^k(\hat{\bm{y}}), \hspace{5mm} \mathcal{N}(\hat{\bm{y}}) := \hat{\bm{y}} - (DH(\hat{\bm{y}}))^{+} H(\hat{\bm{y}}) {\bm{y}}(\bm{s})\\
\bm{y} &= \mathcal{N}^k(\hat{\bm{y}}), \hspace{5mm}
\mathcal{N}(\hat{\bm{y}}) := \hat{\bm{y}} -
(DH(\hat{\bm{y}}))^{+} H(\hat{\bm{y}})
.% .%
\end{align*} \end{align*}
\end{itemize} \end{itemize}
@ -304,7 +305,6 @@
\stopreferences \stopreferences
\end{frame} \end{frame}
\begin{frame} \begin{frame}
\frametitle{Channel Decoding and Polynomial Equations} \frametitle{Channel Decoding and Polynomial Equations}
@ -314,36 +314,49 @@
\item To describe the decoding problem we can use the code constraint \item To describe the decoding problem we can use the code constraint
polynomial \citereference{WT22} polynomial \citereference{WT22}
\begin{align*} \begin{align*}
%h(\bm{x}) = \underbrace{\sum_{i=1}^{n}\left(1-x_i^2\right)^2}_{\text{Bipolar constraint}} + \underbrace{\sum_{j=1}^{m}\left(1 - \left(\prod_{i\in A(j)}x_i\right)\right)^2}_{\text{Parity constraint}} %h(\bm{x}) =
h(\bm{x}) = \sum_{i=1}^{n}\left(1-x_i^2\right)^2 + \sum_{j=1}^{m}\left(1 - \left(\prod_{i\in A(j)}x_i\right)\right)^2 % \underbrace{\sum_{i=1}^{n}\left(1-x_i^2\right)^2}_{\text{Bipolar
% constraint}} + \underbrace{\sum_{j=1}^{m}\left(1 -
% \left(\prod_{i\in
% A(j)}x_i\right)\right)^2}_{\text{Parity constraint}}
h(\bm{x}) = \sum_{i=1}^{n}\left(1-x_i^2\right)^2 +
\sum_{j=1}^{m}\left(1 - \left(\prod_{i\in
A(j)}x_i\right)\right)^2
.% .%
\end{align*} \end{align*}
where $A(j) = \left\{i \in [1:n]: \bm{H}_{j,i} = 1\right\}, \hspace{3mm} j\in [1:m]$ where $A(j) = \left\{i \in [1:n]: \bm{H}_{j,i} = 1\right\},
\hspace{3mm} j\in [1:m]$
represents the set of variables involved in parity check $j$. represents the set of variables involved in parity check $j$.
\item In a similar vein, we can define a polynomial system whose zeros \item In a similar vein, we can define a polynomial system whose zeros
correspond to codewords as correspond to codewords as
\begin{align*} \begin{align*}
F(\bm{x}) = \left[\begin{array}{c}1 - x_1^2 \\ \vdots\\ 1 - x_n^2 \\ 1 - \prod_{i \in A(1)}x_i \\ \vdots\\ 1 - \prod_{i \in A(m)}x_i\end{array}\right] \overset{!}{=} \bm{0} F(\bm{x}) = \left[
\begin{array}{c}1 - x_1^2 \\ \vdots\\ 1 - x_n^2 \\ 1 -
\prod_{i \in A(1)}x_i \\ \vdots\\ 1 -
\prod_{i \in A(m)}x_i
\end{array}\right] \overset{!}{=} \bm{0}
.% .%
\end{align*} \end{align*}
\end{itemize} \end{itemize}
\addreferences \addreferences
{WT22}{Tadashi Wadayama; Satoshi Takabe: Proximal Decoding for LDPC Codes. IEICE Transactions on Fundamentals of Electronics, Communi- {WT22}{Tadashi Wadayama; Satoshi Takabe: Proximal Decoding for LDPC
Codes. IEICE Transactions on Fundamentals of Electronics, Communi-
cations and Computer Sciences advpub (2022), 2022TAP0002.} cations and Computer Sciences advpub (2022), 2022TAP0002.}
\stopreferences \stopreferences
\end{frame} \end{frame}
\begin{frame}[fragile] \begin{frame}[fragile]
\frametitle{Defining Homotopies for Channel Codes} \frametitle{Defining Homotopies for Channel Codes}
\begin{itemize} \begin{itemize}
\item Problem: Homotopy continuation algorithms / existing frameworks \item Problem: Homotopy continuation algorithms / existing frameworks
only really support square systems, i.e., \# equations = \# variables. The only really support square systems, i.e., \# equations =
\# variables. The
system $F(\bm{x}) = \bm{0}$ we previously considered is overdefined system $F(\bm{x}) = \bm{0}$ we previously considered is overdefined
\item \textit{Gröbner bases} allow us to ``[...] transform F into \item \textit{Gröbner bases} allow us to ``[...] transform F into
another set G of polynomials [...] such that F and G are equivalent'' another set G of polynomials [...] such that F and G are
equivalent''
\citereference{B01}, i.e., they have the same zeros \citereference{B01}, i.e., they have the same zeros
\item Limited tests indicate that, for the systems we are interested in, \item Limited tests indicate that, for the systems we are interested in,
finding a Gröbner basis yields a square system finding a Gröbner basis yields a square system
@ -352,8 +365,11 @@
\begin{minipage}{0.45\textwidth} \begin{minipage}{0.45\textwidth}
\begin{align*} \begin{align*}
\overbrace{\bm{H}}^{\text{Parity chek matrix}} &= \left[ \begin{array}{cc} 1 & 1 \end{array}\right] \\ \overbrace{\bm{H}}^{\text{Parity check matrix}} &= \left[
F(\bm{x}) &= \left[ \begin{array}{c} \begin{array}{cc} 1 & 1
\end{array}\right] \\
F(\bm{x}) &= \left[
\begin{array}{c}
1 - x_1^2 \\ 1 - x_1^2 \\
1 - x_2^2\\ 1 - x_2^2\\
1 - x_1x_2 1 - x_1x_2
@ -367,15 +383,17 @@
\end{minipage}% \end{minipage}%
\begin{minipage}{0.45\textwidth} \begin{minipage}{0.45\textwidth}
\begin{align*} \begin{align*}
\tilde{F}(\bm{x}) &= \left[ \begin{array}{c} \tilde{F}(\bm{x}) &= \left[
\begin{array}{c}
x_1 - x_2 \\ x_1 - x_2 \\
x_2^2 - 1 x_2^2 - 1
\end{array}\right] \\ \end{array}\right] \\
G(\bm{x}) &= \left[\begin{array}{c} G(\bm{x}) &= \left[
x_1\\ \begin{array}{c}
x_2 x_1 - y_1\\
x_2 - y_2
\end{array}\right]\\ \end{array}\right]\\
H(\bm{x}, t) &= (t-1)G(\bm{x}) + tF(\bm{x}) H(\bm{x}, t) &= (1-t)G(\bm{x}) + tF(\bm{x})
\end{align*} \end{align*}
\end{minipage} \\ \end{minipage} \\
@ -388,7 +406,6 @@
\stopreferences \stopreferences
\end{frame} \end{frame}
\begin{frame}[fragile] \begin{frame}[fragile]
\frametitle{Path Tracker Implementation (Pseudo Code)} \frametitle{Path Tracker Implementation (Pseudo Code)}
@ -409,17 +426,17 @@
baselinestretch=1, % Line spacing baselinestretch=1, % Line spacing
breaklines, % Allow line breaking breaklines, % Allow line breaking
tabsize=4, % Tab width tabsize=4, % Tab width
]{python} ]{c}
func perform_prediction_step(y) {...} func perform_prediction_step(y, step_size) {...}
func perform_correction_step(y, step_size) {...} func perform_correction_step(y) {...}
func perform_step(y0) { func perform_step(y0) {
for i in range(max_retries): for i in range(max_retries):
step_size = step_size / 2 step_size = step_size / 2
y = perform_prediction_step(y0) y = perform_prediction_step(y0, step_size)
for k in range(max_corrector_iterations): for k in range(max_corrector_iterations):
y = perform_correction_step(y, step_size) y = perform_correction_step(y)
if (corrector converged) break if (corrector converged) break
if (corrector converged) break if (corrector converged) break
@ -437,7 +454,6 @@ func perform_step(y0) {
\stopreferences \stopreferences
\end{frame} \end{frame}
\begin{frame}[fragile] \begin{frame}[fragile]
\frametitle{Decoding Algorithm Implementation (Pseudo Code)} \frametitle{Decoding Algorithm Implementation (Pseudo Code)}
@ -453,7 +469,7 @@ func perform_step(y0) {
baselinestretch=1, % Line spacing baselinestretch=1, % Line spacing
breaklines, % Allow line breaking breaklines, % Allow line breaking
tabsize=4, % Tab width tabsize=4, % Tab width
]{python} ]{c}
func decode(y) { func decode(y) {
for i in range(max_iterations): for i in range(max_iterations):
y = perform_step(y) y = perform_step(y)
@ -466,80 +482,118 @@ func decode(y) {
\end{minted} \end{minted}
\end{frame} \end{frame}
\begin{frame}[fragile]
\begin{frame}
\frametitle{Simulation results} \frametitle{Simulation results}
\begin{figure}[H] \begin{figure}[H]
\centering \centering
\begin{subfigure}{0.5\textwidth} \begin{subfigure}[c]{0.48\textwidth}
\centering \centering
\vskip 0pt
\begin{tikzpicture} \begin{tikzpicture}
\begin{axis}[ \begin{axis}[
domain=-5:5,
width=\textwidth, width=\textwidth,
height=0.75\textwidth, height=0.75\textwidth,
ylabel={FER (-\,-\,-), BER (---)},
ymode=log,
legend,
xlabel = {$Eb/N0$ (dB)},
legend pos= south west,
xmax=6
] ]
\addplot+[mark=none, line width=1pt] % \addplot+[scol0, densely dashed, mark=none, line
{x^2}; % width=1pt, forget plot]
\addplot+[mark=none, line width=1pt] % table[col sep=comma, x=SNR, y=FER]
{x^3}; % {\res/bch_31_26_hc.csv};
\addplot+[mark=none, line width=1pt] % \addplot+[scol0, mark=none, line width=1pt]
{x^4}; % table[col sep=comma, x=SNR, y=BER]
% {\res/bch_31_26_hc.csv};
% \addlegendentry{Homotopy continuation}
%
\addplot+[scol0, densely dashed, mark=none, line width=1pt,
forget plot]
table[col sep=comma, x=SNR, y=FER]
{\res/bch_31_26_hc.csv};
\addplot+[scol0, mark=none, line width=1pt]
table[col sep=comma, x=SNR, y=BER]
{\res/bch_31_26_hc.csv};
\addlegendentry{Homotopy continuation}
\addplot+[scol2, 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+[scol2, 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+[scol2, densely dashed, mark=none, line
% width=1pt, forget plot]
% table[col sep=comma, x=SNR, y=FER]
% {\res/bch_31_26_ml.csv};
% \addplot+[scol2, mark=none, line width=1pt]
% table[col sep=comma, x=SNR, y=BER]
% {\res/bch_31_26_ml.csv};
\addlegendentry{ML}
% \addplot+[mark=none, line width=1pt]
% table[col sep=comma, x=SNR, y=DFR]
% {\res/bch_31_11.csv};
% \addlegendentry{DFR}
\end{axis} \end{axis}
\end{tikzpicture} \end{tikzpicture}
\caption{BCH(31,26) Code}
\end{subfigure}% \end{subfigure}%
\begin{subfigure}{0.5\textwidth} \begin{subfigure}[c]{0.48\textwidth}
\centering \centering
\begin{tikzpicture} \vspace*{-20mm}
\begin{axis}[
domain=-5:5, \begin{tabular}{rl|ccccc}
width=\textwidth, Parameter & Value \\ \hline
height=0.75\textwidth, $n_\text{iter}$ & for homotopy continuation & 20 \\
] $n_\text{iter}$ & for Newton corrector & 5 \\
\addplot+[mark=none, line width=1pt] $\delta_\text{max}$ & for Newton corrector & 0.01 \\
{x}; $\Delta s$ & for Euler predictor & 0.05 \\
\addplot+[mark=none, line width=1pt] $n_\text{retries}$ & for Euler predictor & 5
{2*x}; \end{tabular}
\addplot+[mark=none, line width=1pt]
{3*x}; \bigskip
\end{axis}
\end{tikzpicture} \begin{itemize}
\item Newton homotopy:
\begin{align*}
G(\bm{x}) &= F(x) - F(\bm{y}) \\
H(\bm{x}) &= (1-t)G(\bm{x}) - tF(\bm{x})\\
&= F(\bm{x}) - (1 - t) F(\bm{y})
\end{align*}
\end{itemize}
\end{subfigure} \end{subfigure}
\end{figure} \end{figure}
% \begin{figure}[H]
% \centering
%
% \begin{tikzpicture}
% \begin{axis}[
% width=\textwidth,
% height=0.75\textwidth,
% ]
% \addplot+[mark=none, line width=1pt]
% table[col sep=comma, x=x, y=y]
% {};
% \end{axis}
% \end{tikzpicture}
% \end{figure}
\end{frame} \end{frame}
\begin{frame} \begin{frame}
\frametitle{Next steps} \frametitle{Next steps}
\begin{itemize} \begin{itemize}
\item Simulations for other codes
\item Thorough investigation into parameter choice \item Thorough investigation into parameter choice
\item Find more mathematical background / guarantees \begin{itemize} \item Find more mathematical background / guarantees
\begin{itemize}
\item How do we have to choose $\sigma_0$? \item How do we have to choose $\sigma_0$?
\item Guarantees for convergence? (i.e., what is the cause for \item Guarantees for convergence? (i.e., what is the cause for
decoding failures?) decoding failures?)
\item When do we actually get square systems using the Gröbner basis? \item When do we actually get square systems using
the Gröbner basis?
\end{itemize} \end{itemize}
\item Other ideas: \begin{itemize} \item Other ideas:
\begin{itemize}
\item Generate more candidates by moving further along the \item Generate more candidates by moving further along the
solution curve (if this is possible) and then performing solution curve (if this is possible) and then performing
choosing from this list choosing from this list
@ -547,6 +601,4 @@ func decode(y) {
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\end{document} \end{document}