SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.10389 · NeurIPS · 2020

Semi-Supervised Neural Architecture Search

Tao Qin, Tie-Yan Liu, Rui Wang, Renqian Luo, Xu Tan, Enhong Chen

arXiv · PDF · Open in the Atlas

Code that ran

3 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; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 3 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/2002.10389.json · badge: /api/ran/2002.10389.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
renqianluo/SemiNAS canonical (classifier label)
classifier basis: classifier_2025
2 ran · 2 no recorded run
mlvc-lab/Classification-NAS community
Papers with Code archive
1 ran · 1 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input
renqianluo/SemiNAS/imagenet/nao_controller.py
code served (permissive licence) · get_code("ab3ae1affca959ef")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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

INIT_ARGS = {
    'input_dim': 4,
    'source_dim': 5,
    'output_dim': 6,
    'bias': False,
}

ARGS = {
    'input': torch.randn(2, 1, 4),
    'source_hids': torch.randn(2, 3, 5),
    'mask': None,
}

if __name__ == '__main__':
    from torch.nn import Module
    
    class Attention(nn.Module):

        def __init__(self, input_dim, source_dim=None, output_dim=None, bias=False):
            super(Attention, self).__init__()
            if source_dim is None:
                source_dim = input_dim
            if output_dim is None:
                output_dim = input_dim
            self.input_dim = input_dim
            self.source_dim = source_dim
            self.output_dim = output_dim
            self.input_proj = nn.Linear(input_dim, source_dim, bias=bias)
            self.output_proj = nn.Linear(input_dim + source_dim, output_dim, bias=bias)

        def forward(self, input, source_hids, mask=None):
            batch_size = input.size(0)
            source_len = source_hids.size(1)
            x = self.input_proj(input)
            attn = torch.bmm(x, source_hids.transpose(1, 2))
            if mask is not None:
                attn.data.masked_fill_(mask, -float('inf'))
            attn = torch.nn.functional.softmax(attn.view(-1, source_len), dim=1).view(batch_size, -1, source_len)
            mix = torch.bmm(attn, source_hids)
            combined = torch.cat((mix, input), dim=2)
            output = torch.tanh(self.output_proj(combined.view(-1, self.input_dim + self.source_dim))).view(batch_size, -1, self.output_dim)
            return (output, attn)
    
    attention = Attention(**INIT_ARGS)
    output, attn = attention(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Attention shape: {attn.shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Encoder Ran
ran on a synthesized input
renqianluo/SemiNAS/imagenet/nao_controller.py
code served (permissive licence) · get_code("9ac63141be90a73b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
import torch.nn.functional as F
import math

# Import the class
from torch.nn import Module, Embedding, LSTM, Linear, ModuleList

class Encoder(nn.Module):

    def __init__(self, layers, mlp_layers, vocab_size, hidden_size, mlp_hidden_size, dropout, length, source_length):
        super(Encoder, self).__init__()
        self.layers = layers
        self.mlp_layers = mlp_layers
        self.vocab_size = vocab_size
        self.hidden_size = hidden_size
        self.mlp_hidden_size = mlp_hidden_size
        self.dropout = dropout
        self.length = length
        self.source_length = source_length
        self.embedding = nn.Embedding(self.vocab_size, self.hidden_size)
        if self.source_length != self.length:
            assert self.source_length % self.length == 0
            ratio = self.source_length // self.length
            self.rnn = nn.LSTM(self.hidden_size * ratio, self.hidden_size * ratio, self.layers, batch_first=True, dropout=dropout, bidirectional=True)
            self.out_proj = nn.Linear(self.hidden_size * ratio * 2, self.hidden_size, bias=True)
        else:
            self.rnn = nn.LSTM(self.hidden_size, self.hidden_size, self.layers, batch_first=True, dropout=dropout, bidirectional=True)
            self.out_proj = nn.Linear(self.hidden_size * 2, self.hidden_size, bias=True)
        self.mlp = nn.ModuleList([])
        for i in range(self.mlp_layers):
            if i == 0:
                self.mlp.append(nn.Linear(self.hidden_size, self.mlp_hidden_size))
            elif i == self.mlp_layers - 1:
                self.mlp.append(nn.Linear(self.mlp_hidden_size, self.hidden_size))
            else:
                self.mlp.append(nn.Linear(self.mlp_hidden_size, self.mlp_hidden_size))
        self.regressor = nn.Linear(self.hidden_size, 1)

    def forward_predictor(self, x):
        residual = x
        for i, mlp_layer in enumerate(self.mlp):
            x = mlp_layer(x)
            x = F.relu(x)
            if i != self.mlp_layers:
                x = F.dropout(x, self.dropout, training=self.training)
        x = (residual + x) * math.sqrt(0.5)
        x = self.regressor(x)
        predict_value = torch.sigmoid(x)
        return predict_value

    def forward(self, x):
        x = self.embedding(x)
        x = F.dropout(x, self.dropout, training=self.training)
        if self.source_length != self.length:
            assert self.source_length % self.length == 0
            ratio = self.source_length // self.length
            x = x.view(-1, self.source_length // ratio, ratio * self.hidden_size)
        out, hidden = self.rnn(x)
        out = self.out_proj(out)
        out = (out + x) * math.sqrt(0.5)
        out = F.normalize(out, 2, dim=-1)
        encoder_outputs = out
        encoder_hidden = hidden
        out = torch.mean(out, dim=1)
        out = F.normalize(out, 2, dim=-1)
        arch_emb = out
        residual = out
        for i, mlp_layer in enumerate(self.mlp):
            out = mlp_layer(out)
            out = F.relu(out)
            if i != self.mlp_layers:
                out = F.dropout(out, self.dropout, training=self.training)
        out = (residual + out) * math.sqrt(0.5)
        out = self.regressor(out)
        predict_value = torch.sigmoid(out)
        return (encoder_outputs, encoder_hidden, arch_emb, predict_value)

    def infer(self, x, predict_lambda, direction='+'):
        encoder_outputs, encoder_hidden, arch_emb, predict_value = self(x)
        grads_on_outputs = torch.autograd.grad(predict_value, encoder_outputs, torch.ones_like(predict_value))[0]
        if direction == '+':
            new_encoder_outputs = encoder_outputs + predict_lambda * grads_on_outputs
        elif direction == '-':
            new_encoder_outputs = encoder_outputs - predict_lambda * grads_on_outputs
        else:
            raise ValueError('Direction must be + or -, got {} instead'.format(direction))
        new_encoder_outputs = F.normalize(new_encoder_outputs, 2, dim=-1)
        new_arch_emb = torch.mean(new_encoder_outputs, dim=1)
        new_arch_emb = F.normalize(new_arch_emb, 2, dim=-1)
        return (encoder_outputs, encoder_hidden, arch_emb, predict_value, new_encoder_outputs, new_arch_emb)


INIT_ARGS = {
    'layers': 2,
    'mlp_layers': 2,
    'vocab_size': 100,
    'hidden_size': 4,
    'mlp_hidden_size': 8,
    'dropout': 0.1,
    'length': 5,
    'source_length': 5,
}

ARGS = {
    'x': torch.randint(0, 100, (2, 5)),
}

if __name__ == '__main__':
    encoder = Encoder(**INIT_ARGS)
    encoder.eval()
    output = encoder(**ARGS)
    print("Forward output shapes:")
    print(f"  encoder_outputs: {output[0].shape}")
    print(f"  encoder_hidden: {output[1][0].shape}, {output[1][1].shape}")
    print(f"  arch_emb: {output[2].shape}")
    print(f"  predict_value: {output[3].shape}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
move_to_cuda Ran
ran, honoured the contract we drafted
mlvc-lab/Classification-NAS/SemiNAS/nasbench/train_seminas.py
code served (permissive licence) · get_code("83b572d45378f8a3")
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 (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create a small tensor for testing
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
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 (2, 4) — shape (2, 4) 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
Decoder Not yet run
unverified (harvested, no recorded run)
renqianluo/SemiNAS/imagenet/nao_controller.py
code served (permissive licence) · get_code("8b769fdfd42c56f2")
How it ran

no invocation recorded.

NAO Not yet run
unverified (harvested, no recorded run)
renqianluo/SemiNAS/imagenet/nao_controller.py
code served (permissive licence) · get_code("998924910b1a7ba5")
How it ran

no invocation recorded.

controller_train Not yet run
unverified (harvested, no recorded run)
mlvc-lab/Classification-NAS/SemiNAS/nasbench/train_seminas.py
code served (permissive licence) · get_code("e0256c89101161b3")
How it ran

no invocation recorded.

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

Neural architecture search (NAS) relies on a good controller to generate better architectures or predict the accuracy of given architectures. However, training the controller requires both abundant and high-quality pairs of architectures and their accuracy, while it is costly to evaluate an architecture and obtain its accuracy. In this paper, we propose SemiNAS, a semi-supervised NAS approach that leverages numerous unlabeled architectures (without evaluation and thus nearly no cost). Specifically, SemiNAS 1) trains an initial accuracy predictor with a small set of architecture-accuracy data pairs; 2) uses the trained accuracy predictor to predict the accuracy of large amount of architectures (without evaluation); and 3) adds the generated data pairs to the original data to further improve the predictor. The trained accuracy predictor can be applied to various NAS algorithms by predicting the accuracy of candidate architectures for them. SemiNAS has two advantages: 1) It reduces the computational cost under the same accuracy guarantee. On NASBench-101 benchmark dataset, it achieves comparable accuracy with gradientbased method while using only 1/7 architecture-accuracy pairs. 2) It achieves higher accuracy under the same computational cost. It achieves 94.02% test accuracy on NASBench-101, outperforming all the baselines when using the same number of architectures. On ImageNet, it achieves 23.5% top-1 error rate (under 600M FLOPS constraint) using 4 GPU-days for search. We further apply it to LJSpeech text to speech task and it achieves 97% intelligibility rate in the low-resource setting and 15% test error rate in the robustness setting, with 9%, 7% improvements over the baseline respectively.

For agents

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

get_harvested_code_for_paper("2002.10389")
get_code_for_paper("2002.10389")
have("2002.10389")

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

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

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

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

Connect an agent — have() is free.