← 全部资源LaTeX 模板
EN Article Note
面向英文技术说明与 expository writing,保持论证结构、公式和引用的清晰。
设计思路
这套模板面向 英文说明性笔记(expository notes),比正式论文松,比短卡片完整:
- 顶部信息栏:标题、副标题、作者、单位和主题标签在首页一次交代清楚。
- 清楚的层级:section 标题、theorem、remark、roadmap、insight 各有明确的视觉层级。
- 适合屏幕阅读:版面尺寸和行距按屏幕阅读调整,并带字体回退。
适合写一篇独立的理论笔记、课程 handout 或技术说明文。
环境要求
- 编译器:
XeLaTeX或LuaLaTeX - 宏包:
fontspec,microtype,tcolorbox,titlesec,fancyhdr,tikz,mathtools,amsthm,enumitem - 推荐字体:
- 衬线:
Times New Roman,回退到TeX Gyre Termes - 无衬线:
Helvetica Neue,回退到TeX Gyre Heros - 等宽:
JetBrains Mono,回退到Menlo / Courier New
- 衬线:
源文件
用法
改 \MakeArticleHeader 里的标题、副标题、作者和 tags 即可开始写。正文主要用这几个环境组织:
RoadmapBoxInsightBoxExampleBoxtheorem / proposition / remark
完整源码(EN.tex)
\documentclass[11pt]{article}
\usepackage{iftex}
\ifPDFTeX
\errmessage{Please compile with XeLaTeX or LuaLaTeX}
\fi
\usepackage{fontspec}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{microtype}
\usepackage{hyperref}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage[most]{tcolorbox}
\usepackage{amsmath,amssymb,amsthm,mathtools,bm}
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage[nameinlink,noabbrev]{cleveref}
\geometry{
paperwidth=7.25in,
paperheight=10in,
left=0.82in,
right=0.82in,
top=0.8in,
bottom=0.82in,
headsep=0.25in,
footskip=0.42in
}
\IfFontExistsTF{Times New Roman}{\setmainfont{Times New Roman}}{\setmainfont{TeX Gyre Termes}}
\IfFontExistsTF{Helvetica Neue}{\setsansfont{Helvetica Neue}}{\setsansfont{TeX Gyre Heros}}
\IfFontExistsTF{JetBrains Mono}{\setmonofont{JetBrains Mono}}{\IfFontExistsTF{Menlo}{\setmonofont{Menlo}}{\setmonofont{Courier New}}}
\linespread{1.22}
\setlength{\parindent}{1.4em}
\setlength{\parskip}{0.2em}
\definecolor{brand}{HTML}{5B8CFF}
\definecolor{brandD}{HTML}{2F54EB}
\definecolor{themegreen}{HTML}{1DBA8C}
\definecolor{themegreenD}{HTML}{178A69}
\definecolor{ink}{HTML}{1A1A1A}
\definecolor{keybg}{HTML}{EFF4FF}
\definecolor{keydark}{HTML}{1F3C88}
\definecolor{accent}{HTML}{FFB84D}
\definecolor{accentD}{HTML}{FF8F1F}
\definecolor{soft}{HTML}{FFFBF2}
\definecolor{xhsRed}{HTML}{FF6B6B}
\definecolor{xhsDark}{HTML}{1F1F1F}
\definecolor{xhsCream}{HTML}{FFF8EE}
\definecolor{xhsBlue}{HTML}{3A86FF}
\definecolor{xhsYellow}{HTML}{FFC857}
\definecolor{secblue}{HTML}{365CFF}
\definecolor{thmBg}{RGB}{240,245,255}
\definecolor{lemBg}{RGB}{255,242,242}
\definecolor{defBg}{RGB}{235,248,242}
\hypersetup{
colorlinks=true,
linkcolor=brandD,
citecolor=brandD,
urlcolor=secblue,
pdfauthor={MIStatlE},
pdftitle={EN Article Template}
}
\titleformat{\section}
{\Large\bfseries\color{keydark}}
{\thesection}{0.6em}{}
\titlespacing*{\section}{0pt}{1.0em}{0.45em}
\titleformat{\subsection}
{\large\bfseries\color{brand}}
{\thesubsection}{0.55em}{}
\titlespacing*{\subsection}{0pt}{0.85em}{0.3em}
\setlist[itemize]{leftmargin=1.5em,itemsep=0.25em,topsep=0.4em}
\setlist[enumerate]{leftmargin=1.7em,itemsep=0.25em,topsep=0.4em}
\newcommand{\ArticleShortTitle}{Uniform Stability Notes}
\newcommand{\ArticleAuthor}{MIStatlE}
\fancyhf{}
\renewcommand{\headrulewidth}{0.4pt}
\fancyhead[L]{\small\sffamily\color{brandD}\ArticleShortTitle}
\fancyhead[R]{\small\sffamily\color{ink!72}\nouppercase{\rightmark}}
\fancyfoot[L]{\small\sffamily\color{brand}\ArticleAuthor}
\fancyfoot[R]{\small\sffamily\color{brand}\thepage}
\pagestyle{fancy}
\fancypagestyle{plain}{\pagestyle{fancy}}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\tcbset{
en-card/.style={
enhanced,
breakable,
boxrule=0.7pt,
arc=4pt,
left=10pt,right=10pt,top=10pt,bottom=10pt
},
en-soft/.style={
enhanced,
breakable,
frame hidden,
borderline west={3pt}{0pt}{#1},
colback=#1!7,
left=9pt,right=9pt,top=8pt,bottom=8pt,
arc=2pt
},
meta-tag/.style={
on line,
boxsep=1pt,
left=5pt,right=5pt,top=2pt,bottom=2pt,
colback=brandD,
colframe=brandD,
boxrule=0pt,
arc=3pt,
fontupper=\scriptsize\bfseries\color{white}
}
}
\newcommand{\MakeArticleHeader}[5]{%
\begin{tcolorbox}[
en-card,
colback=white,
colframe=brandD!25!white,
borderline west={4pt}{0pt}{accent}
]
{\small\sffamily\color{ink!60} #4 \hfill #3}\par
\vspace{0.4em}
{\bfseries\fontsize{24}{28}\selectfont\color{keydark} #1\par}
\vspace{0.2em}
{\large\color{brand} #2\par}
\vspace{0.65em}
\foreach \Tag in {#5}{\tcbox[meta-tag]{\Tag}\hspace{0.35em}}
\end{tcolorbox}
\vspace{0.7em}
}
\newtcolorbox{RoadmapBox}{
en-card,
colback=keybg,
colframe=brandD,
title=\textbf{Roadmap},
fonttitle=\bfseries,
coltitle=white,
colbacktitle=brandD
}
\newtcolorbox{InsightBox}{
en-soft=brandD,
title=\textbf{Insight},
fonttitle=\bfseries,
coltitle=brandD
}
\newtcolorbox{ExampleBox}{
en-card,
colback=soft,
colframe=accent,
title=\textbf{Example},
fonttitle=\bfseries,
coltitle=white,
colbacktitle=accent
}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\tcolorboxenvironment{theorem}{en-card,colback=thmBg,colframe=secblue,borderline west={3pt}{0pt}{secblue}}
\tcolorboxenvironment{lemma}{en-card,colback=lemBg,colframe=xhsRed,borderline west={3pt}{0pt}{xhsRed}}
\tcolorboxenvironment{proposition}{en-card,colback=thmBg,colframe=brandD,borderline west={3pt}{0pt}{brandD}}
\tcolorboxenvironment{corollary}{en-card,colback=thmBg,colframe=brand,borderline west={3pt}{0pt}{brand}}
\tcolorboxenvironment{definition}{en-soft=themegreenD,colback=defBg,title=\textbf{Definition},fonttitle=\bfseries,coltitle=themegreenD}
\tcolorboxenvironment{remark}{en-soft=accentD,title=\textbf{Remark},fonttitle=\bfseries,coltitle=accentD}
\DeclareMathOperator{\Var}{Var}
\newcommand{\E}{\mathbb{E}}
\newcommand{\norm}[1]{\left\lVert #1 \right\rVert}
\begin{document}
\MakeArticleHeader
{Uniform Stability and the Shape of Generalization}
{A clean article template for expository notes}
{MIStatlE}
{Learning Theory Handout · Spring 2026}
{Generalization,Stability,SGD}
\begin{RoadmapBox}
This template is designed for a note that sits somewhere between a handout and an article: long enough to develop one argument carefully, but light enough to remain readable on screen. The visual hierarchy is intentionally simple: theorem-level claims are boxed, side insights are soft, and examples are meant to break abstraction with one concrete calculation.
\end{RoadmapBox}
\section{The stability viewpoint}
Suppose a learning algorithm $\mathcal{A}$ maps a sample $S=(z_1,\dots,z_n)$ to a predictor $\mathcal{A}(S)$. Stability asks a local question: how much does the output move when we replace a single observation? The power of this question is that a local perturbation can often control a global quantity, namely the generalization gap.
\begin{definition}[Uniform stability]
An algorithm $\mathcal{A}$ is $\beta$-uniformly stable with respect to a loss $\ell$ if for any two samples $S,S'$ differing in one coordinate,
\[
\sup_{z} \left| \ell(\mathcal{A}(S),z) - \ell(\mathcal{A}(S'),z) \right| \le \beta.
\]
\end{definition}
\begin{InsightBox}
Uniform stability is not merely a proof device. It tells you which algorithms forget individual data points quickly, and that is exactly what a robust training dynamic should do.
\end{InsightBox}
\section{From local perturbation to global gap}
The classical Bousquet--Elisseeff argument turns the one-point replacement bound into an expectation bound for generalization. The result is conceptually important because it avoids direct uniform convergence machinery.
\begin{theorem}[Expected generalization via stability]
Let $\mathcal{A}$ be a $\beta$-uniformly stable learning algorithm and assume $0 \le \ell \le 1$. Then
\[
\left| \E\bigl[R(\mathcal{A}(S)) - \widehat{R}_S(\mathcal{A}(S))\bigr] \right| \le \beta,
\]
where $R$ denotes population risk and $\widehat{R}_S$ empirical risk.
\end{theorem}
\begin{proof}
For each index $i$, let $S^{(i)}$ be the sample where $z_i$ is replaced by an independent copy. Expanding the expectation of the empirical risk and swapping one coordinate at a time yields a telescoping decomposition. Each term is controlled by the stability assumption, and averaging over $i$ produces the claimed $\beta$ bound.
\end{proof}
\begin{remark}
This proof pattern is worth remembering: construct a coupled sample that differs in one point, write the target quantity as an average of one-point replacement errors, then use the local bound everywhere.
\end{remark}
\section{A smooth convex example}
For regularized empirical risk minimization with a strongly convex objective, one often obtains stability by comparing two minimizers of neighboring objectives. The argument is short but structurally rich.
\begin{proposition}[A prototype bound]
Assume the objective is $\lambda$-strongly convex and each individual loss is $L$-Lipschitz. Then the ERM solution is typically $O(L^2/(\lambda n))$-stable.
\end{proposition}
\begin{InsightBox}
The rate already tells you the tradeoff: increasing regularization improves stability, while increasing sample size dilutes the effect of any single example.
\end{InsightBox}
\begin{ExampleBox}
If the objective is
\[
F_S(w)=\frac{1}{n}\sum_{i=1}^n \ell(w;z_i)+\frac{\lambda}{2}\norm{w}_2^2,
\]
then strong convexity of $F_S$ and the Lipschitz property of $\ell$ combine to show that the minimizers for $S$ and $S'$ must remain close. Once parameter distance is controlled, loss difference follows immediately.
\end{ExampleBox}
\section{What to keep in mind when writing with this template}
\begin{itemize}
\item Use the header block for title, subtitle, affiliation, and topic tags.
\item Reserve theorem boxes for claims that deserve to stand apart from the flow.
\item Use `RoadmapBox` for orientation and `InsightBox` for one-sentence conceptual compression.
\item Treat `ExampleBox` as the place where abstraction turns into a calculation or a sanity check.
\end{itemize}
\end{document}


