\documentclass[aspectratio=169,11pt,fontset=fandol]{ctexbeamer}

\usetheme{hust}

\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{colortbl}
\usepackage{listings}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning}

\setsansfont{Fira Sans}
\setmonofont{Fira Mono}
\setCJKsansfont{FandolHei-Regular}[BoldFont=FandolHei-Bold]

\title[HUST Beamer]{面向可信人工智能的\\结构化推理方法}
\subtitle{Structured Reasoning for Trustworthy\\Artificial Intelligence}
\author{张同学}
\institute{华中科技大学}
\date{2026 年 7 月}
\hustsetdepartment{人工智能与自动化学院}
\hustsetdepartmenten{School of Artificial Intelligence and Automation}
\hustsetevent{博士学位论文答辩}
\hustseteventen{PhD Dissertation Defense}

\lstdefinestyle{hust}{
  basicstyle=\ttfamily\fontsize{7.2}{8.4}\selectfont,
  keywordstyle=\color{HUSTInk}\bfseries,
  commentstyle=\color{HUSTMuted},
  stringstyle=\color{HUSTText},
  backgroundcolor=\color{HUSTCode},
  frame=none,
  framesep=2.2mm,
  xleftmargin=4mm,
  framexleftmargin=0mm,
  numbers=left,
  numberstyle=\tiny\color{HUSTMuted},
  numbersep=6pt,
  showstringspaces=false,
  tabsize=2,
  aboveskip=0pt,
  belowskip=0pt
}
\lstset{style=hust}

\begin{document}

\maketitle

\begin{frame}[plain,t]
  \begin{hustoutlinepage}
    \hustoutlineitem{01}{问题与目标}
      {可信系统不仅要给出答案，还要提供可检查的中间证据。}
    \vspace{2mm}
    \hustoutlineitem{02}{方法}
      {通过任务分解、局部求解和一致性验证组织推理过程。}
    \vspace{2mm}
    \hustoutlineitem{03}{结果与讨论}
      {在有限的额外计算成本下，显著提升错误恢复能力。}
  \end{hustoutlinepage}
\end{frame}

\hustsetsectionnote{无法检查的过程，不足以支撑可信结论。}
\section{问题与目标}

\begin{frame}{为什么需要结构化推理？}
  \begin{columns}[T,onlytextwidth]
    \column{66mm}
      \begin{block}{从答案到证据}
        \begin{itemize}
          \item 大模型能够生成流畅答案，\\
            但中间过程往往不可检查。
          \item 学术与工程场景更关注\\
            可追溯性、稳定性与错误边界。
          \item 复杂任务需要被拆解为\\
            可以独立验证的推理单元。
        \end{itemize}
      \end{block}

    \column{44mm}
      \hustkicker{设计目标}\par
      \vspace{2mm}
      \hustmetric{可验证}{输入、输出与检查均明确。}
      \vspace{2mm}
      \hustmetric{可恢复}{失败后只重算受影响的局部步骤。}
  \end{columns}
\end{frame}

\begin{frame}{三个设计原则}
  \begin{columns}[T,onlytextwidth]
    \column{35mm}
      \hustkicker{01 / DECOMPOSE}\par
      \vspace{2mm}
      {\large\bfseries 可分解\par}
      \vspace{1.5mm}
      {\small 将长链问题拆分成短而明确的子任务。}
    \column{35mm}
      \hustkicker{02 / VERIFY}\par
      \vspace{2mm}
      {\large\bfseries 可验证\par}
      \vspace{1.5mm}
      {\small 每一步都产生可以独立检查的中间状态。}
    \column{35mm}
      \hustkicker{03 / RECOVER}\par
      \vspace{2mm}
      {\large\bfseries 可恢复\par}
      \vspace{1.5mm}
      {\small 检测失败后，只重算受影响的局部步骤。}
  \end{columns}

  \vspace{4mm}
  \begin{exampleblock}{共同约束}
    模块之间只交换显式状态；验证器负责给出通过、拒绝或局部修正信号。
  \end{exampleblock}
\end{frame}

\begin{frame}{Item 建立阅读顺序}
  \begin{columns}[T,onlytextwidth]
    \column{55mm}
      \hustkicker{ITEMIZE / 并列信息}\par
      \vspace{1.8mm}
      \begin{itemize}
        \hustitem{结论先行}
          {每项先给出观点，再补充一行依据。}
        \hustitem{句式平行}
          {同一层级保持相近的信息颗粒度。}
        \hustitem{层级克制}{}
          \begin{itemize}
            \item 次级条目补充条件或例外。
            \begin{itemize}
              \item 三级仅用于必要注释。
            \end{itemize}
          \end{itemize}
      \end{itemize}

    \column{55mm}
      \hustkicker{ENUMERATE / 顺序步骤}\par
      \vspace{1.8mm}
      \begin{enumerate}
        \hustitem{定义输入}
          {问题、状态与约束保持明确。}
        \hustitem{执行任务}{}
          \begin{enumerate}
            \item 生成候选
            \item 保存中间状态
          \end{enumerate}
        \hustitem{检查输出}
          {失败时只进入局部恢复。}
      \end{enumerate}
  \end{columns}
\end{frame}

\begin{frame}{Box 用标题带建立语义边界}
  \begin{block}{蓝色 / 核心信息与结论}
    \begin{itemize}
      \item 窄蓝色标题带负责命名主语义区域。
      \item 淡紫灰正文面承载解释、比较与 Future Work。
    \end{itemize}
  \end{block}

  \vspace{2mm}
  \begin{exampleblock}{粉色 / 定义、公式与局部强调}
    \begin{itemize}
      \item 粉色标题带用于定义、公式与次级语义区域。
      \item \alert{真正的风险与失败仍然只用红色文字表达。}
    \end{itemize}
  \end{exampleblock}
\end{frame}

\hustsetsectionnote{先分解，再验证；失败只回滚局部。}
\section{方法}

\begin{frame}{结构化推理框架}
  \begin{block}{模块化执行与局部恢复}
    \centering
    \begin{tikzpicture}[
      node distance=3.5mm and 3.5mm,
      box/.style={
        draw=HUSTRule,
        fill=HUSTMist,
        minimum width=19mm,
        minimum height=11mm,
        align=center,
        font=\scriptsize
      },
      key/.style={
        box,
        draw=HUSTText,
        fill=HUSTText,
        text=white,
        font=\scriptsize\bfseries
      },
      result/.style={
        box,
        draw=HUSTMuted,
        fill=HUSTSurfaceStrong,
        text=HUSTInk,
        font=\scriptsize\bfseries
      },
      flow/.style={
        -{Stealth[length=2mm]},
        line width=.8pt,
        draw=HUSTInk
      },
      feedback/.style={
        -{Stealth[length=2mm]},
        line width=.8pt,
        draw=HUSTRed
      }
    ]
      \node[box] (input) {原始问题\\Input};
      \node[key,right=of input] (plan) {任务分解\\Planner};
      \node[box,right=of plan] (solve) {局部求解\\Solver};
      \node[key,right=of solve] (check) {一致性验证\\Verifier};
      \node[result,right=of check] (answer) {最终答案\\Answer};

      \draw[flow] (input) -- (plan);
      \draw[flow] (plan) -- (solve);
      \draw[flow] (solve) -- (check);
      \draw[flow] (check) --
        node[midway,above=0.8mm,font=\tiny,text=HUSTMuted] {通过} (answer);
      \draw[feedback]
        (check.north) -- ++(0,5mm)
        -| node[pos=.25,above,font=\tiny,text=HUSTRed] {局部修正}
        (plan.north);
    \end{tikzpicture}

    \vspace{1mm}
    {\scriptsize\color{HUSTMuted}
      深灰表示前向主流程；红色只表示验证失败后的局部反馈。}
  \end{block}
\end{frame}

\begin{frame}{目标函数与局部恢复}
  \begin{columns}[T,onlytextwidth]
    \column{66mm}
      \begin{exampleblock}{联合优化目标}
        \small
        \[
          \mathcal{L}(\theta)
          =
          \mathcal{L}_{\mathrm{task}}
          + \lambda\mathcal{L}_{\mathrm{verify}}
          + \beta\mathbb{E}[C].
        \]
        \textcolor{HUSTInk}{\(\mathcal{L}_{\mathrm{task}}\)}
        \quad 最终任务误差\par
        \vspace{1.5mm}
        \textcolor{HUSTInk}{\(\mathcal{L}_{\mathrm{verify}}\)}
        \quad 中间状态验证误差\par
        \vspace{1.5mm}
        \textcolor{HUSTInk}{\(\mathbb{E}[C]\)}
        \quad 平均计算成本
      \end{exampleblock}

    \column{44mm}
      \begin{block}{局部恢复性}
        若依赖图无环且节点验证器完备，单点失败只需重算后继闭包，
        不影响独立分支。

        \vspace{2mm}
        \hustkicker{失败 \(\rightarrow\) 后继闭包 \(\rightarrow\) 重算}
      \end{block}
  \end{columns}
\end{frame}

\begin{frame}[fragile]{最小实现与接口契约}
\begin{lstlisting}[language=Python]
def reason(problem, modules):
    plan, solve, verify = modules
    state = {}
    for step in plan(problem):
        result = solve(step, state)
        if not verify(step, result, state):
            result = solve(step, state, revise=True)
        state[step.id] = result
    return result
\end{lstlisting}

\vspace{1mm}

  \begin{exampleblock}{接口契约}
    {\fontsize{8.2}{10}\selectfont
      \setlength{\tabcolsep}{1.2mm}%
      \renewcommand{\arraystretch}{1.08}%
      \begin{tabular}{@{}p{50mm}p{50mm}@{}}
        \textbf{输入}\quad 问题与已验证状态 &
        \textbf{输出}\quad 可复核的局部结果 \\
        \textbf{验证}\quad 通过或拒绝 &
        \textbf{失败}\quad 仅修正当前依赖分支
      \end{tabular}}
  \end{exampleblock}
\end{frame}

\hustsetsectionnote{关键结果：在有限额外步骤下，可恢复率达到 73.5\%。}
\section{结果与讨论}

\begin{frame}{实验结果}
  \begin{columns}[T,onlytextwidth]
    \column{78mm}
      \hustkicker{四种推理策略对比}\par
      \vspace{2mm}
      {\scriptsize
      \renewcommand{\arraystretch}{1.42}
      \arrayrulecolor{HUSTRule}
      \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}lccc@{}}
        \toprule
        方法 & 正确率 $\uparrow$ & 平均步数 $\downarrow$ & 可恢复率 $\uparrow$ \\
        \midrule
        Direct             & 71.4 & \textbf{1.0} & 0.0 \\
        Chain-of-Thought   & 78.9 & 6.8 & 12.3 \\
        Self-Consistency   & 82.1 & 34.0 & 18.7 \\
        \textbf{Ours}      & \textcolor{HUSTInk}{\textbf{86.7}}
                           & 9.4
                           & \textcolor{HUSTInk}{\textbf{73.5}} \\
        \bottomrule
      \end{tabular*}
      \arrayrulecolor{HUSTInk}}

      \vspace{2mm}
      {\tiny\color{HUSTMuted}
        示例数据仅用于验证信息密度、表格层级与强调语义。}

    \column{32mm}
      \hustkicker{关键结果}\par
      \vspace{2mm}
      \hustmetric{86.7\%}{正确率领先对照。}
      \vspace{2mm}
      \hustmetric{73.5\%}{失败可定位并恢复。}
  \end{columns}
\end{frame}

\begin{frame}{结论}
  \hustoutlineitem{01}{结构化表示}
    {让推理过程可以被检查、追踪并局部修复。}
  \vspace{1mm}
  \hustoutlineitem{02}{显式验证}
    {在合理计算成本下，提高系统的可靠性与恢复能力。}
  \vspace{1mm}
  \hustoutlineitem{03}{下一步}
    {研究弱监督条件下的自动验证器与动态任务分解。}
\end{frame}

\begin{frame}[standout]
  \hustclosing
    {感谢聆听}
    {Questions \& Discussion}
    {张同学 · 人工智能与自动化学院}
\end{frame}

\end{document}
