In theoretical computer science, and specifically computational complexity theory and circuit complexity, TC0 (Threshold Circuit) is the first class in the hierarchy of TC classes. TC0 contains all languages which are decided by Boolean circuits with constant depth and polynomial size, containing only unbounded fan-in AND gates, OR gates, NOT gates, and MAJ gates, or equivalently, threshold gates.
TC0 contains several important problems, such as sorting nn-bit numbers, multiplying two n-bit numbers, integer division [1] or recognizing the Dyck language with two types of parentheses. It is commonly used to model the computational complexity of bounded-depth neural networks, and indeed, it was originally proposed for this purpose. [2]
A Boolean circuit family is a sequence of Boolean circuits consisting of a feedforward network of Boolean functions. A binary language is in the TC0 class if there exists a Boolean circuit family , such that
Equivalently, instead of majority gates, we can use threshold gates with integer weights and thresholds, bounded by a polynomial. A threshold gate with inputs is defined by a list of weights and a single threshold . Upon binary inputs , it outputs if , else it outputs . A threshold gate is also called an artificial neuron.
Given a Boolean circuit with AND, OR, NOT, and threshold gates whose weights and thresholds are bounded within , If we also provide the network with negations of binary inputs: , then we can convert the network to one that computes the same input-output function using only AND, OR, and threshold gates, with the same depth, at most double the number of gates in each layer, weights bounded within , and thresholds bounded within . Therefore, TC0 can be defined equivalently as the languages decidable by some Boolean circuit family such that
In this article, we by default consider Boolean circuits with a polynomial number of AND, OR, NOT, and threshold gates, with polynomial bound on integer weights and thresholds. The polynomial bound on weights and thresholds can be relaxed without changing the class .
In arithmetic circuit complexity theory, can be equivalently characterized as the class of languages defined as the images of , where each is computed by a polynomial-size constant-depth unbounded-fan-in arithmetic circuits with + and × gates, and constants from . [3]
We can relate TC0 to other circuit classes, including AC0 and NC1 as follows: [4]
Whether is a strict inclusion is "one of the main open problems in circuit complexity". [4] In fact, it is even open whether is a strict inclusion! This is in some sense unsurprising, since there is no natural proof for , assuming that there is a cryptographically secure pseudorandom number generator in , which have been explicitly constructed under the assumption that factoring Blum integers is hard (i.e. requires circuits of size ), which is widely suspected to be true. [5] More generally, randomness and hardness for have been shown to be closely related. [6] It is also an open question whether . Indeed, was only proven in 2011. [7]
Note that, while the time hierarchy theorem proves that , both complexity classes are uniform, meaning that a single Turing machine is responsible for solving the problem at any input length. In contrast, a circuit family may be non-uniform, meaning that there may be no good algorithm for finding the correct circuit, other than exhaustive search over all possible Boolean circuits of bounded depth and size, then checking all possible inputs to verify that the circuit is correct.
It has been proven that if , then any , there exists a circuit family of gate number that solves the Boolean Formula Evaluation problem. Thus, any superlinear bound suffices to prove . [8]
DLOGTIME-uniform is also known as , because it is equivalent to first-order logic with Majority quantifiers. [9] Specifically, given a logic formula that takes Boolean variables, a Majority quantifier is used as follows: given a formula with exactly one free variable , the quantified is true iff is true for over half of , Integer division (given -bit integers, find ), powering (given an -bit integer, and a -bit integer, find ), and iterated multiplication (multiplying of -bit integers) are all in DLOGTIME-uniform . [10] [1] It is usually considered the appropriate level of uniformity for , neither too strong nor too weak. Specifically, because P is usually suspected to be stronger than , while DLOGTIME is suspected to be equivalent in strength in some sense, DLOGTIME-uniformity is usually assumed, when uniformity is considered for . [11]
The permanent of a 0-1 matrix is not in uniform . [12]
Uniform . [13]
The functional version of the uniform TC0 coincides with the closure with respect to composition of the projections and one of the following function sets , . [14] Here , is a bitwise AND of and . By functional version one means the set of all functions over non-negative integers that are bounded by functions of FP and is in the uniform TC0.
TC0 can be divided further, into a hierarchy of languages requiring up to 1 layer, 2 layers, etc. Let be the class of languages decidable by a threshold circuit family of up to depth :The hierarchy can be even more finely divided.
The MAJ gate is sometimes called an unweighted threshold gate. They are equivalent up to a uniform polynomial overhead. In detail:
Furthermore, there is an explicit algorithm, by which, given a single -input threshold gate with arbitrary (unbounded) integer weights and thresholds, it constructs a depth-2 circuit using -many AND, OR, NOT, and MAJ gates. Thus, any polynomial-size, depth- threshold circuit can be simulated uniformly by a polynomial-size majority circuit of depth . [15] [16]
As a separation theorem, it is known that the -input Boolean inner product function (IP), defined below, is computable by a majority circuit with 3 layers and gates, but is not computable by a threshold circuit with 2 layers and gates. [17] : Section 11.10.2
For any fixed , because there are only finitely many Boolean functions that can be computed by a threshold logic unit, it is possible to set all to be integers. Let be the smallest number such that every possible real threshold function of variables can be realized using integer weights of absolute value . It is known that [18] See [17] : Section 11.10 for a literature review.
Sometimes the class of polynomial-bounded weights and thresholds with depth is denoted as , and denotes the class where the weight and thresholds are unbounded ("large weight threshold circuit"). This formalizes neural networks with real-valued activation functions. [19]
As previously stated, any polynomial-size, depth- threshold circuit can be simulated uniformly by a polynomial-size majority circuit of depth . Therefore, . It has been proven that . [15]
Allowing the sigmoid activation function does not increase the power, that is, for all , assuming the weights are polynomially bounded. [20]
Like how the P class has a probabilistic version BPP, the has a probabilistic version . It is defined as the class of languages that can be polynomial-probabilistically decided. [21]
Let be a Boolean circuit family that takes two kinds of inputs. A given circuit takes the deterministic inputs , and the random inputs , where . The random inputs are sampled uniformly over all possibilities.
A language is decided polynomial-probabilistically by the family if for each , if , then the probability that is at least , and if , then the probability that is at most .
Similarly, (feedforward) Boltzmann machines have been modelled as circuits with boundedly-unreliable threshold units. That is, each threshold unit may, independently at random, with a bounded probability , make the wrong output. [22]
Sometimes, this class is also called , in a closer analogy with BPP. In this definition, the probability that is at least , and if , then the probability that is at most . By the standard trick of sampling many times then taking the majority opinion, any -layer circuit can be converted to a -layer circuit.
Analogous to how , can also be divided intoBy definition, . , thus giving a full hierarchy: [21] Similarly, allowing boundedly-unreliable threshold units, a circuit can be converted to a circuit by running several copies of the original circuit in parallel, each with a fixed choice for the random inputs (a hardcoded advice), and then taking a Majority over their outputs. That at least one advice exists is proven by Hoeffding's inequality, with essentially the same argument as the median trick. [22] This argument is merely an existence proof, and thus not uniform in a way that matters for , since it gives no algorithm for discovering the advice other than brute-force enumeration.
Similarly, . [23]
Let be defined as the parity function, or the XOR function. Then the following two separations are theorems: [21]
The inner product function falls outside in a precise sense: [17] : Section 11.10.2
It is an open question how many levels the hierarchy has. It is also an open question whether the hierarchy collapses, that is, . [19] In fact, there is still no exponential lower bound for . Therefore, a fortiori, there is still no exponential lower bound for depth-3 polynomial-size majority circuits. There are exponential lower bounds if further restrictions are imposed on layer 1, such as requiring it to only contain AND gates, or only bounded fan-in gates. [17] : Section 11.10.3
The hierarchy for monotone (that is, without Boolean negations) is strongly separated. Specifically, for each , there has been constructed a language that is decidable by a depth circuit family using only AND and OR gates, but requires exponential size to compute by a monotone . [25]
If the polynomial bound on the number of gates is relaxed, then is quite powerful. Specifically, any language in can be decided by a circuit family in (using Majority gates), except that it uses a quasi-polynomial number of gates (instead of polynomial). [26] [27] This result is optimal, in that there exists a function that is computable with 3 layers of , but requires at least an exponential number of gates for (using Majority gates). [28]