SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.07996 · ACL · 2022

Leveraging Unimodal Self-Supervised Learning for Multimodal Audio-Visual Speech Recognition

Helong Zhou, Xinbing Wang, Zhouhan Lin, Yichen Gong, Xichen Pan, Peiyu Chen

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 0 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/2203.07996.json · badge: /api/ran/2203.07996.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
lumia-group/leveraging-self-supervised-learning-for-avsr canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
crop_patch Ran
ran on a synthesized input
lumia-group/leveraging-self-supervised-learning-for-avsr/preprocess/preprocessing.py
code served (permissive licence) · get_code("04af7ca817c65533")
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 ndarray, ndim 4, dtype family int, shape (15, 120, 120, 3) 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 numpy as np
from collections import deque

# Create small synthetic frames (video frames)
# STD_SIZE is (224, 224), so frames should be that size or similar
frames = [
    np.random.rand(224, 224, 3).astype(np.float32) for _ in range(15)
]

# Create landmarks: 68 points with x,y coordinates
# Landmarks need to be valid for all 15 frames
landmarks = [
    np.random.rand(68, 2).astype(np.float32) * 200 + 20 
    for _ in range(15)
]

# Create mean face landmarks: also 68 points with x,y coordinates
# This is used as reference for the similarity transform
mean_face_landmarks = np.random.rand(68, 2).astype(np.float32) * 200 + 20

ARGS = {
    "frames": frames,
    "landmarks": landmarks,
    "mean_face_landmarks": mean_face_landmarks,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family int, shape (15, 120, 120, 3) — shape (15, 120, 120, 3) 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
cut_patch Ran
ran on a synthesized input
lumia-group/leveraging-self-supervised-learning-for-avsr/preprocess/preprocessing.py
code served (permissive licence) · get_code("96bde5c83493b6bb")
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 ndarray, ndim 3, dtype family int, shape (40, 50, 3) 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 numpy as np

# Create a simple test image (height=100, width=120)
img = np.random.randint(0, 256, size=(100, 120, 3), dtype=np.uint8)

# Create landmarks - array of (x, y) coordinates that will be averaged to find center
# Using 4 points that average to approximately (60, 50)
landmarks = np.array([
    [55, 48],
    [65, 52],
    [58, 50],
    [62, 49]
], dtype=np.float32)

# Patch dimensions
height = 20
width = 25

# Threshold for bias tolerance
threshold = 5

ARGS = {
    'img': img,
    'landmarks': landmarks,
    'height': height,
    'width': width,
    'threshold': threshold
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (40, 50, 3) — shape (40, 50, 3) 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
generate_square_subsequent_mask Ran
ran on a synthesized input
lumia-group/leveraging-self-supervised-learning-for-avsr/models/utils.py
code served (permissive licence) · get_code("693dceead2019125")
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 (5, 5) 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 = {
    "sz": 5,
    "device": torch.device("cpu")
}
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 (5, 5) — shape (5, 5) 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
get_files Ran
ran on a synthesized input
lumia-group/leveraging-self-supervised-learning-for-avsr/saveh5.py
code served (permissive licence) · get_code("cb52c4993e0435d8")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 os
import tempfile

# Create a temporary directory structure for testing
tmpdir = tempfile.mkdtemp()
dataset_name = "test_dataset"
fold_name = "train"

# Create the dataset directory and fold subdirectory
os.makedirs(os.path.join(tmpdir, fold_name), exist_ok=True)

# Create a dataset.txt file with sample data
dataset_file = os.path.join(tmpdir, f"{dataset_name}.txt")
with open(dataset_file, 'w') as f:
    f.write("file1.txt extra_info\n")
    f.write("file2.txt extra_info\n")
    f.write("file3.txt extra_info\n")

# Create the corresponding files referenced in the dataset file
for i in range(1, 4):
    filepath = os.path.join(tmpdir, fold_name, f"file{i}.txt")
    with open(filepath, 'w') as f:
        f.write(f"content of file {i}")

ARGS = {
    "datadir": tmpdir,
    "dataset": dataset_name,
    "fold": fold_name,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
preprocess_sample Ran
ran on a synthesized input
lumia-group/leveraging-self-supervised-learning-for-avsr/preprocess/find_mean.py
code served (permissive licence) · get_code("5b77efeb5cecfa7b")
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 cv2 as cv
import numpy as np
from unittest.mock import Mock, MagicMock

# Create a mock face detector
face_detector = Mock()

# Create a mock landmark with part() method
mock_landmark = Mock()
mock_parts = [Mock(x=float(i), y=float(i+1)) for i in range(68)]
mock_landmark.part = lambda i: mock_parts[i]

# Create a mock landmark detector
landmark_detector = Mock(return_value=mock_landmark)

# Create a mock face rectangle
mock_rect = Mock()

# Configure face detector to return a list with one rectangle
face_detector.return_value = [mock_rect]

# Mock cv.VideoCapture to simulate video reading
original_videocapture = cv.VideoCapture
class MockVideoCapture:
    def __init__(self, filepath):
        self.frame_count = 0
        self.max_frames = 2
    
    def isOpened(self):
        return self.frame_count < self.max_frames
    
    def read(self):
        if self.frame_count < self.max_frames:
            frame = np.random.randint(0, 256, (200, 200, 3), dtype=np.uint8)
            self.frame_count += 1
            return True, frame
        return False, None
    
    def release(self):
        pass

cv.VideoCapture = MockVideoCapture

ARGS = {
    'file': 'test_video',
    'face_detector': face_detector,
    'landmark_detector': landmark_detector
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — 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
shape_to_array Ran
ran on a synthesized input
lumia-group/leveraging-self-supervised-learning-for-avsr/preprocess/find_mean.py
code served (permissive licence) · get_code("f3a5a2d37d6e8b20")
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 ndarray, ndim 2, dtype family float, shape (68, 2) 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 numpy as np

class MockShape:
    """Mock dlib shape object with 68 landmarks"""
    def __init__(self):
        self.landmarks = [(float(i), float(i + 0.5)) for i in range(68)]
    
    def part(self, i):
        """Return a mock point object with x, y coordinates"""
        class Point:
            def __init__(self, x, y):
                self.x = x
                self.y = y
        return Point(self.landmarks[i][0], self.landmarks[i][1])

mock_shape = MockShape()

ARGS = {
    "shape": mock_shape
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (68, 2) — shape (68, 2) 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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
cut_patch 1 other paper
1 dated earlier
2201.07131 (2022-01)
Leveraging Real Talking Faces via Self-Supervision for Robust Forgery Detection

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

Training Transformer-based models demands a large amount of data, while obtaining aligned and labelled data in multimodality is rather cost-demanding, especially for audio-visual speech recognition (AVSR). Thus it makes a lot of sense to make use of unlabelled unimodal data. On the other side, although the effectiveness of large-scale self-supervised learning is well established in both audio and visual modalities, how to integrate those pretrained models into a multimodal scenario remains underexplored. In this work, we successfully leverage unimodal self-supervised learning to promote the multimodal AVSR. In particular, audio and visual front-ends are trained on large-scale unimodal datasets, then we integrate components of both front-ends into a larger multimodal framework which learns to recognize parallel audio-visual data into characters through a combination of CTC and seq2seq decoding. We show that both components inherited from unimodal selfsupervised learning cooperate well, resulting in that the multimodal framework yields competitive results through fine-tuning. Our model is experimentally validated on both word-level and sentence-level tasks. Especially, even without an external language model, our proposed model raises the state-of-the-art performances on the widely accepted Lip Reading Sentences 2 (LRS2) dataset by a large margin, with a relative improvement of 30%.

For agents

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

get_harvested_code_for_paper("2203.07996")
get_code_for_paper("2203.07996")
have("2203.07996")

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

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

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

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

Connect an agent — have() is free.