跳到正文
ResAI

USAAIO 2026

第二轮 · 第二天

一道扩散模型推导题,以及两道在现实约束下的开放式建模题。
日期
2026年4月5日
题目数
3
小题数
9
总分
140

题面为官方英文原文。

第 3 题扩散模型

50 分

引导题

摘要从第一性原理推导扩散模型的训练目标:前向过程的性质、用贝叶斯公式推导反向过程、KL 散度,以及神经网络参数化。

    生成式 AI高斯分布KL 散度

Submission Requirements

  1. Each contestant must submit a Jupiter Notebook (.ipynb). You should put all your solutions on this file.

  2. Your submitted file must follow the format

    Diffusion_LastName_FirstName_SchoolName
    
  3. Each part’s name/number must appear in a text cell in bold section format, such as

    # **Part 1.3.4**
    

In this problem, we study the diffusion model, which is widely used in modern generative AI systems. For simplicity, we consider one-dimensional data, so all variables take values in R\mathbb{R}.

Notation and Preliminaries For a random variable xx, we write

x∼N(μ,σ2)x \sim \mathcal{N}(\mu, \sigma^2)

to denote that xx follows a normal distribution with mean μ\mu and variance σ2\sigma^2. The probability density function of a one-dimensional Gaussian distribution is

f(x)=12πσ2exp⁡(−(x−μ)22σ2).f(x) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right).

When conditioning on another variable yy, we write

x∣y∼N(μ,σ2)x \mid y \sim \mathcal{N}(\mu, \sigma^2)

to mean that conditional on yy, the random variable xx follows a normal distribution with mean μ\mu and variance σ2\sigma^2. Define

αˉt=∏s=1tαs.\bar{\alpha}_t = \prod_{s=1}^{t} \alpha_s.

Part 3.1. Properties of the Forward Process

Let 0<αt<10 < \alpha_t < 1 be a sequence of parameters. The forward diffusion process is defined by

xt=αt xt−1+1−αt ϵt,x_t = \sqrt{\alpha_t}\, x_{t-1} + \sqrt{1-\alpha_t}\, \epsilon_t,

where

ϵt∼N(0,1)\epsilon_t \sim \mathcal{N}(0, 1)

and the noise variables ϵ1,ϵ2,…\epsilon_1, \epsilon_2, \ldots are independent. The sequence

x0,x1,x2,…,xTx_0, x_1, x_2, \ldots, x_T

forms a Markov chain describing the gradual addition of Gaussian noise.

Mathematically prove that x2x_2 can be written in the form

x2=A2x0+B2ϵˉ2,x_2 = A_2 x_0 + B_2 \bar{\epsilon}_2,

where

ϵˉ2∼N(0,1).\bar{\epsilon}_2 \sim \mathcal{N}(0, 1).

Find explicit expressions for A2A_2 and B2B_2. Then, using this expression, conclude that the conditional distribution of x2x_2 given x0x_0 is Gaussian, and compute its mean and variance. A complete derivation is required.

Mathematically prove that for any t≥1t \geq 1, xtx_t can be written in the form

xt=Atx0+Btϵˉt,x_t = A_t x_0 + B_t \bar{\epsilon}_t,

where

ϵˉt∼N(0,1).\bar{\epsilon}_t \sim \mathcal{N}(0, 1).

Find explicit expressions for AtA_t and BtB_t. Then, using this expression, conclude that the conditional distribution of xtx_t given x0x_0 is Gaussian, and compute its mean and variance. Your final answers should be written in terms of αˉt\bar{\alpha}_t and x0x_0. A complete derivation is required.

We have

xt∣x0∼N(μt∣0,σt∣02).x_t \mid x_0 \sim \mathcal{N}(\mu_{t|0}, \sigma^2_{t|0}).

Compute

lim⁡t→∞μt∣0andlim⁡t→∞σt∣02.\lim_{t \to \infty} \mu_{t|0} \quad \text{and} \quad \lim_{t \to \infty} \sigma^2_{t|0}.

Your final answers should be simplified as much as possible. Reasoning is required.

Part 3.2. Kullback–Leibler Divergence

Let qq and pp be two one-dimensional normal distributions defined as

q∼N(μq,σq2),p∼N(μp,σp2).q \sim \mathcal{N}(\mu_q, \sigma_q^2), \qquad p \sim \mathcal{N}(\mu_p, \sigma_p^2).

Compute the Kullback–Leibler divergence

DKL(q ∥ p).D_{KL}(q \,\|\, p).

Your answer should be expressed in terms of μq,μp,σq2,σp2\mu_q, \mu_p, \sigma_q^2, \sigma_p^2. A complete derivation is required.

In the diffusion model, the true posterior distribution of the forward process is

q(xt−1∣xt,x0)∼N(μ~t(xt,x0),β~t),q(x_{t-1} \mid x_t, x_0) \sim \mathcal{N}(\tilde{\mu}_t(x_t, x_0), \tilde{\beta}_t),

while the reverse generative model is

pθ(xt−1∣xt)∼N(μθ(xt,t),σt2).p_\theta(x_{t-1} \mid x_t) \sim \mathcal{N}(\mu_\theta(x_t, t), \sigma_t^2).

Compute

DKL(q(xt−1∣xt,x0) ∥ pθ(xt−1∣xt)).D_{KL}\Big(q(x_{t-1} \mid x_t, x_0) \,\|\, p_\theta(x_{t-1} \mid x_t)\Big).

Your answer should be expressed in terms of

μ~t(xt,x0), μθ(xt,t), β~t, σt2.\tilde{\mu}_t(x_t, x_0),\ \mu_\theta(x_t, t),\ \tilde{\beta}_t,\ \sigma_t^2.

A complete derivation is required.

Compute μ~t(xt,x0)\tilde{\mu}_t(x_t, x_0) and β~t\tilde{\beta}_t in

q(xt−1∣xt,x0)∼N(μ~t(xt,x0),β~t).q(x_{t-1} \mid x_t, x_0) \sim \mathcal{N}(\tilde{\mu}_t(x_t, x_0), \tilde{\beta}_t).

Your final answers should be expressed in terms of xt,x0,αtx_t, x_0, \alpha_t, and αˉt\bar{\alpha}_t. A complete derivation is required.

Recall from Part 3.1.2 that xtx_t can be written in terms of x0x_0 and ϵˉt\bar{\epsilon}_t. First express x0x_0 in terms of xtx_t and ϵˉt\bar{\epsilon}_t. Then substitute this expression into the formula for μ~t(xt,x0)\tilde{\mu}_t(x_t, x_0) obtained in the previous part, and rewrite it in terms of xt,ϵˉt,αtx_t, \bar{\epsilon}_t, \alpha_t, and αˉt\bar{\alpha}_t. A complete derivation is required.

Assume that

σt2=β~t.\sigma_t^2 = \tilde{\beta}_t.

Suppose that at time step tt, the model outputs a quantity ϵθ(xt,t)\epsilon_\theta(x_t, t), and that the reverse-process mean μθ(xt,t)\mu_\theta(x_t, t) is written in terms of xtx_t and ϵθ(xt,t)\epsilon_\theta(x_t, t) in the same form as the expression obtained for μ~t(xt,x0)\tilde{\mu}_t(x_t, x_0) in the previous part.

Using this parameterization, compute

DKL(q(xt−1∣xt,x0) ∥ pθ(xt−1∣xt)).D_{KL}\Big(q(x_{t-1} \mid x_t, x_0) \,\|\, p_\theta(x_{t-1} \mid x_t)\Big).

Your final answer should be simplified as much as possible. A complete derivation is required.

Neural Network Parameterization

In the reverse generative process, we use a deep neural network to predict the noise term

ϵθ(xt,t).\epsilon_\theta(x_t, t).

Suppose the input xtx_t is a tensor with shape

(B,C,L0,L1,L2,…,LM−1),(B, C, L_0, L_1, L_2, \ldots, L_{M-1}),

where BB denotes the batch size, CC denotes the number of channels, and L0,L1,…,LM−1L_0, L_1, \ldots, L_{M-1} denote the spatial or data dimensions. The output ϵθ(xt,t)\epsilon_\theta(x_t, t) has the same tensor shape as xtx_t. Because the function ϵθ(xt,t)\epsilon_\theta(x_t, t) depends on the time step tt, explain how to design the architecture of the deep neural network so that the information of tt is incorporated into the model. Your answer should describe how the time step tt is represented and how this representation is incorporated into the neural network. No programming or implementation is required. Provide a conceptual explanation.

第 4 题RGB 图像中的几何形状分类

40 分

开放题

摘要仅有 20% 的数据带标签、没有验证集且不得使用预训练模型的条件下,对三角形、矩形和圆形进行分类。

    半监督学习卷积神经网络伪标签

In this problem, you will solve an image classification task involving simple geometric shapes. Each sample consists of a single RGB image containing exactly one geometric object. Your goal is to correctly classify the type of shape present in the image.

Image Model Each image is a color image of size

112×112112 \times 112

with three color channels (RGB). The background of the image is white. Each image contains exactly one geometric shape, which can be one of the following:

  • a circle,
  • a triangle,
  • a rectangle.

The shapes are generated with variability in the following aspects:

  • Position: The shape may appear anywhere in the image.
  • Scale: The size of the shape varies across samples.
  • Rotation: Triangles and rectangles may be rotated by arbitrary angles.
  • Shape geometry: Triangles are not necessarily equilateral.
  • Color: Each shape is rendered in a randomly selected RGB color.

Dataset Description

Training dataset

The training dataset contains 1,000 samples. Each sample indexed from 0 to 199 includes

  • an RGB image,
  • the corresponding shape label.

Each sample indexed from 200 to 999 has an RGB image only (no ground-truth label).

Test dataset

The test dataset contains 300 samples. For each test sample you are given only the RGB image.

Prediction Targets For each test sample ss, you must predict a single label

ys∈{0,1,2}.y_s \in \{0, 1, 2\}.

The label definitions are:

  • 0: circle,
  • 1: triangle,
  • 2: rectangle.

Evaluation Metric The evaluation score is macro F1F1. Higher scores indicate better performance.

Invalid Predictions For a missing or invalid prediction:

  • If the predicted label is missing or not in {0,1,2}\{0, 1, 2\}, it is treated as an incorrect prediction.

Prohibited Models All pretrained models (regardless of whether you use their pretrained parameters) are prohibited, such as those imported from torchvision.models or HuggingFace. That is, you are required to build your own model and train it from scratch. If you violate this rule, you will get 0 point in this problem.

Prohibited Label Imputation/Prediction Method For training data samples with missing labels, participants are not allowed to inspect the images and manually determine their labels using human vision. Participants may either exclude these samples from training or impute the missing labels using a coding-based method. Manual labeling based on visual inspection is strictly prohibited. For the test dataset, participants must not predict labels by visually inspecting the images. All predictions must be generated using code.

Baseline Model The baseline solution is to make no predictions at all. Under this approach, the resulting score is zero. We adopt this trivial baseline to provide a clear reference point. Any meaningful model should achieve a score above zero, demonstrating that it has learned useful information from the data.

Final Competition Score Let

  • XX be your score,
  • XbaselineX_{\text{baseline}} be the baseline score,
  • XbestX_{\text{best}} be the best score among all contestants.

Your final competition score is computed as

Scorefinal=X−XbaselineXbest−Xbaseline×100%.Score_{\text{final}} = \frac{X - X_{\text{baseline}}}{X_{\text{best}} - X_{\text{baseline}}} \times 100\%.

If

X<Xbaseline,X < X_{\text{baseline}},

then the final score is 0.

Submission Requirements Each contestant must submit three files:

  • a prediction file (.csv),
  • a Jupyter notebook with all your code (.ipynb),
  • A report that describes the model you submitted in your .ipynb file, any other models you tried but did not adopt, and your thought process for this problem (.docx).

File naming format

All submitted files must follow the format

Shape_Classification_LastName_FirstName_SchoolName

Submission format

A sample submission CSV file is provided. Your submission must follow exactly the same structure as the sample submission file.

Starter Code Please use the following URL:

https://drive.google.com/file/d/15ISQTWZSSuVzuCRyNibaNAQVsuXH2ChB/view?usp=drive_link

第 5 题混合函数参数回归

50 分

开放题

摘要给定来自四类未知函数(线性、对数、指数、正弦)的 400 个数据点,同时判断每个点所属的函数类型并估计各函数的参数。

    隐变量模型聚类函数拟合

Problem Overview In this problem, data are organized into groups. Each group contains 400 observed data points (x,y)(x, y). The observations in each group are generated from a mixture of four mathematical functions:

  • an exponential function
  • a logarithmic function
  • a trigonometric function
  • a linear function

Each function contributes 100 data points, and Gaussian noise is added to the observations. Thus, each group corresponds to one set of parameters describing the four functions. Your task is to use the 400 observed points in each group to estimate the parameters of all four functions.

Mathematical Models Each group contains data generated from the following four equations.

Exponential function

y=a0ea1x+a2y = a_0 e^{a_1 x} + a_2

Logarithmic function

y=b0ln⁡(x)+b1y = b_0 \ln(x) + b_1

Trigonometric function

y=c0sin⁡(c1x+c2)+c3y = c_0 \sin(c_1 x + c_2) + c_3

Linear function

y=d0x+d1y = d_0 x + d_1

Each group therefore contains 11 parameters:

a0,a1,a2, b0,b1, c0,c1,c2,c3, d0,d1a_0, a_1, a_2,\ b_0, b_1,\ c_0, c_1, c_2, c_3,\ d_0, d_1

Dataset Description

Training data

The training dataset contains 400 groups. The file train.csv contains observed data points with columns

group_id, x, y.\texttt{group\_id},\ x,\ y.

Each group contains 400 observations. The file train_params.csv contains the true parameters for the training groups with columns

group_id,a0,a1,a2,b0,b1,c0,c1,c2,c3,d0,d1.\texttt{group\_id}, a_0, a_1, a_2, b_0, b_1, c_0, c_1, c_2, c_3, d_0, d_1.

Test data

The test dataset contains 200 groups. The file test.csv contains observed data points with columns

group_id, x, y.\texttt{group\_id},\ x,\ y.

Each group also contains 400 observations.

Task Using the training data, build a model that maps

400 observations (x,y)→11 parameters.400 \text{ observations } (x, y) \to 11 \text{ parameters.}

Then apply your model to the test dataset. For each group in test.csv, predict

a0,a1,a2, b0,b1, c0,c1,c2,c3, d0,d1.a_0, a_1, a_2,\ b_0, b_1,\ c_0, c_1, c_2, c_3,\ d_0, d_1.

Evaluation Metric Submissions are evaluated using the Root Mean Squared Error (RMSE). The RMSE is computed across all predicted parameters for all groups:

RMSE=1N∑i=1N(p^i−pi)2.RMSE = \sqrt{\frac{1}{N} \sum_{i=1}^{N} (\hat{p}_i - p_i)^2}.

Here pip_i denotes the true parameter value, p^i\hat{p}_i denotes the predicted parameter value, and NN is the total number of predicted parameters across all groups. Lower RMSE indicates better performance.

Baseline Solution A baseline approach proceeds as follows. For each group, the 400 observed points (x,y)(x, y) are first partitioned into four clusters using a clustering method such as K-means with k=4k = 4. Since the data in each group are generated from four different functions, each cluster is expected to correspond approximately to one of the four function types. Next, for each cluster, four candidate models are fitted: exponential, logarithmic, trigonometric, and linear. For each function type, the model that best fits one of the clusters is selected, and the corresponding parameters are used as the predicted parameters for that function. Combining the parameters from the four fitted functions produces the 11 predicted parameters for that group. The performance of this baseline solution defines the baseline RMSE, denoted by XbaselineX_{\text{baseline}}.

Final Competition Score Let XX be the RMSE of your submission, XbaselineX_{\text{baseline}} be the RMSE of the baseline solution, and XbestX_{\text{best}} be the best RMSE among all submissions. The final competition score is computed as

Scorefinal=Xbaseline−XXbaseline−Xbest×100%.Score_{final} = \frac{X_{\text{baseline}} - X}{X_{\text{baseline}} - X_{\text{best}}} \times 100\%.

If X>XbaselineX > X_{\text{baseline}}, then the final score is 0. The best submission receives 100% of the total score in this problem.

Submission Requirements Each contestant must submit three files:

  • a prediction file (.csv),
  • a Jupyter notebook with all your code (.ipynb),
  • A report that describes the model you submitted in your .ipynb file, any other models you tried but did not adopt, and your thought process for this problem (.docx).

All submitted files must follow the format

mix_functions_LastName_FirstName_SchoolName

Hint If you knew which function each data point belongs to, you might consider the following to help you estimate parameters that modulate the function:

scipy.optimize.curve_fit

This can be found here:

https://docs.scipy.org/doc/scipy/index.html

Please use the following URL:

https://drive.google.com/file/d/134CU_q4kTEYa2umo71ybniEAq5sfHkfX/view?usp=drive_link

命题设计与理念了解第二轮题目为何如此设计。

题目与解答版权归 USA-NA-AIO(USAAIO)所有,注明出处后用于教育目的展示;摘要和知识点标签由 ResAI 撰写。来源: usaaio.org