SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.02379 · CVPR · 2023

CodeTalker: Speech-Driven 3D Facial Animation with Discrete Motion Prior

Jue Wang, Menghan Xia, Yuechen Zhang, Jinbo Xing, Xiaodong Cun, Tien-Tsin Wong

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 3 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2301.02379.json · badge: /api/ran/2301.02379.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Doubiiu/CodeTalker canonical (classifier label)
classifier basis not recorded on the link
8 ran · 5 no recorded run
FunctionStatusWhere it lives
calc_vq_loss Ran
ran; our contract draft was wrong, not the code
Doubiiu/CodeTalker/metrics/loss.py
code served (permissive licence) · get_code("87e078575d34ea1b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors for pred and target
# Using shape (2, 4) - batch size 2, feature dimension 4
pred = torch.randn(2, 4)
target = torch.randn(2, 4)

# Create a quantization loss tensor
# This will be reduced with .mean() in the function
quant_loss = torch.randn(2, 4)

# Define parameters
quant_loss_weight = 1.0
alpha = 1.0

ARGS = {
    'pred': pred,
    'target': target,
    'quant_loss': quant_loss,
    'quant_loss_weight': quant_loss_weight,
    'alpha': alpha
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
enc_dec_mask Ran
ran, violated the contract we drafted
Doubiiu/CodeTalker/models/utils.py
code served (permissive licence) · get_code("d7523a5532d72598")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (3, 6) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "device": "cpu",
    "dataset": "BIWI",
    "T": 3,
    "S": 6
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (3, 6) — shape (3, 6) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
init_biased_mask Ran
ran, honoured the contract we drafted
Doubiiu/CodeTalker/models/utils.py
code served (permissive licence) · get_code("1466011fe70e2a6c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (8, 16, 16) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

ARGS = {
    "n_head": 8,
    "max_seq_len": 16,
    "period": 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (8, 16, 16) — shape (8, 16, 16) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_cfg_from_cfg_file Ran
ran; our contract draft was wrong, not the code
Doubiiu/CodeTalker/base/config.py
code served (permissive licence) · get_code("277a13798d6d6981")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned CfgNode. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os
import yaml

# Create a temporary YAML file for testing
temp_dir = tempfile.mkdtemp()
yaml_file = os.path.join(temp_dir, "config.yaml")

# Create a valid YAML config file with the expected structure
config_data = {
    "model": {
        "name": "test_model",
        "layers": 3,
        "hidden_dim": 64
    },
    "training": {
        "learning_rate": 0.001,
        "batch_size": 32,
        "epochs": 10
    },
    "data": {
        "dataset": "cifar10",
        "split": 0.8
    }
}

with open(yaml_file, 'w') as f:
    yaml.dump(config_data, f)

ARGS = {
    "file": yaml_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CfgNode — a CfgNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CfgNode output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
main_process Ran
ran, violated the contract we drafted
Doubiiu/CodeTalker/base/utilities.py
code served (permissive licence) · get_code("06fca4c705811abe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import argparse

class Args:
    def __init__(self):
        self.multiprocessing_distributed = False
        self.rank = 0
        self.ngpus_per_node = 1

ARGS = {
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
poly_learning_rate Ran
ran, honoured the contract we drafted
Doubiiu/CodeTalker/base/baseTrainer.py
code served (permissive licence) · get_code("02e70a983f480c01")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    "base_lr": 0.1,
    "curr_iter": 5,
    "max_iter": 100,
    "power": 0.9
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
state_dict_remove_module Ran
ran; our contract draft was wrong, not the code
Doubiiu/CodeTalker/base/baseTrainer.py
code served (permissive licence) · get_code("1ef9cd6baadd5b76")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned OrderedDict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from collections import OrderedDict

torch.manual_seed(0)

# The function takes a state_dict (which is typically a dictionary of model parameters)
# and removes 'module.' prefix from keys. This is commonly used when converting
# from DataParallel models back to regular models.

# Create a sample state_dict with some keys that have 'module.' prefix
state_dict = OrderedDict()
state_dict['module.layer1.weight'] = torch.randn(4, 3)
state_dict['module.layer1.bias'] = torch.randn(4)
state_dict['module.layer2.weight'] = torch.randn(5, 4)
state_dict['layer3.weight'] = torch.randn(2, 5)

ARGS = {
    'state_dict': state_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
step_learning_rate Ran
ran, honoured the contract we drafted
Doubiiu/CodeTalker/base/baseTrainer.py
code served (permissive licence) · get_code("a72b06550626f858")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    'base_lr': 0.1,
    'epoch': 10,
    'step_epoch': 3,
    'multiplier': 0.1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calc_logit_loss Not yet run
unverified (harvested, no recorded run)
Doubiiu/CodeTalker/metrics/loss.py
code served (permissive licence) · get_code("acb64f2fa917ebe2")
How it ran

no invocation recorded.

create_attention_mask_from_input_mask Not yet run
unverified (harvested, no recorded run)
Doubiiu/CodeTalker/utils/base_model_util.py
code served (permissive licence) · get_code("6724d3c3b405ad31")
How it ran

no invocation recorded.

create_look_ahead_mask Not yet run
unverified (harvested, no recorded run)
Doubiiu/CodeTalker/utils/base_model_util.py
code served (permissive licence) · get_code("3130054bb4fb2580")
How it ran

no invocation recorded.

dropout Not yet run
unverified (harvested, no recorded run)
Doubiiu/CodeTalker/utils/base_model_util.py
code served (permissive licence) · get_code("9ffc1505608f8450")
How it ran

no invocation recorded.

merge_cfg_from_list Not yet run
unverified (harvested, no recorded run)
Doubiiu/CodeTalker/base/config.py
code served (permissive licence) · get_code("4efe685c6fb1ec11")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 13 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 13 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
merge_cfg_from_list 23 other papers
8 dated earlier, 14 later, 1 same year, order not determinable
2003.13328 (2020-03)
Strip Pooling: Rethinking Spatial Pooling for Scene Parsing
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2111.15174 (2021-11)
CRIS: CLIP-Driven Referring Image Segmentation
and 20 more not named here
load_cfg_from_cfg_file 22 other papers
8 dated earlier, 13 later, 1 same year, order not determinable
2003.13328 (2020-03)
Strip Pooling: Rethinking Spatial Pooling for Scene Parsing
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2111.15174 (2021-11)
CRIS: CLIP-Driven Referring Image Segmentation
and 19 more not named here
main_process 3 other papers
1 dated earlier, 2 later
2007.12140 (2020-07)
HITNet: Hierarchical Iterative Tile Refinement Network for Real-time Stereo Matching
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
enc_dec_mask 2 other papers
1 dated earlier, 1 later
2112.05329 (2021-12)
FaceFormer: Speech-Driven 3D Facial Animation with Transformers
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
poly_learning_rate 2 other papers
2 later
2306.12941 (2023-06)
Towards Reliable Evaluation and Fast Training of Robust Semantic Segmentation Models
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
calc_logit_loss 1 other paper
1 later
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
calc_vq_loss 1 other paper
1 later
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
create_attention_mask_from_input_mask 1 other paper
1 later
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
create_look_ahead_mask 1 other paper
1 later
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
dropout 1 other paper
1 later
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
init_biased_mask 1 other paper
1 later
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
state_dict_remove_module 1 other paper
1 later
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation
step_learning_rate 1 other paper
1 later
2507.12001 (2025-07)
AU-Blendshape for Fine-grained Stylized 3D Facial Expression Manipulation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Speech-driven 3D facial animation has been widely studied, yet there is still a gap to achieving realism and vividness due to the highly ill-posed nature and scarcity of audiovisual data. Existing works typically formulate the crossmodal mapping into a regression task, which suffers from the regression-to-mean problem leading to over-smoothed facial motions. In this paper, we propose to cast speechdriven facial animation as a code query task in a finite proxy space of the learned codebook, which effectively promotes the vividness of the generated motions by reducing the cross-modal mapping uncertainty. The codebook is learned by self-reconstruction over real facial motions and thus embedded with realistic facial motion priors. Over the discrete motion space, a temporal autoregressive model is employed to sequentially synthesize facial motions from the input speech signal, which guarantees lip-sync as well as plausible facial expressions. We demonstrate that our approach outperforms current state-of-the-art methods both qualitatively and quantitatively. Also, a user study further justifies our superiority in perceptual quality. Code and video demo are available at https://doubiiu. github.io/projects/codetalker.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2301.02379")
get_code_for_paper("2301.02379")
have("2301.02379")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2301.02379.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2301.02379.svg)](https://syntology.ai/paper/2301.02379)

Connect an agent — have() is free.