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 n n-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]

Definitions

edit

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

  • There exists a polynomial function  , and a constant  .
  • Each   is composed of up to   unbounded fan-in AND, OR, NOT, and MAJ gates in up to   layers.
  • For each  , we have   iff  .
 
Threshold gate.

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

  • There exists a polynomial function  , and a constant  .
  • Each   is composed of up to   threshold gates in up to   layers, whose weights are non-negative integers, thresholds are integers, and both weights and thresholds are bounded within  .
  • For each  , we have   iff  .

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]

Complexity class relations

edit
Unsolved problem in computer science
 

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 because non-uniform   and   can compute functions that are not Turing-computable, it is certainly the case that   and  . The 2011 result simply shows that   and   are incomparable classes. The open question is whether   and   are incomparable as well.

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]

Uniform TC0

edit

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.

Fine structure

edit

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.

MAJ vs threshold

edit

The MAJ gate is sometimes called an unweighted threshold gate. They are equivalent up to a uniform polynomial overhead. In detail:

  • A MAJ gate is a threshold gate where all the weights are 1, and threshold is   the fan-in.
  • A polynomial-size circuit containing threshold gates with polynomial integer weights and threshold can be converted to a polynomial-size circuit with the same depth. Specifically, the weights can be simulated by replicating the input circuits, and the threshold can be simulated by replicating constant True/False inputs.

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 

Arbitrary threshold gate

edit

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]

Probabilistic version

edit

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.

Hierarchy

edit

Analogous to how  ,   can also be divided into By definition,  . Furthermore, since  ,[21] there is a full hierarchy:  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 PARITY function   is in  , but not in  .[21]
  •  : The Boolean inner product function (IP) is in   but not in  , where[21]  

The inner product function falls outside   in a precise sense:[17]: Section 11.10.2 

  • If the weights of the bottom gates of a threshold circuit of depth 2 computing   are polynomial, then for any  , for all large enough  ,   requires   gates.[21]
  • If the weights of the top gate in a threshold circuit of depth 2 computing   are at most  , then the top gate must have fanin at least  .[21]
  • If the weights of the bottom gates of a threshold circuit of depth 2 computing   do not exceed  , then the top gate must have fanin at least  .[24]

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]

References

edit
  1. ^ a b Hesse, William; Allender, Eric; Mix Barrington, David (2002). "Uniform constant-depth threshold circuits for division and iterated multiplication". Journal of Computer and System Sciences. 65 (4): 695–716. doi:10.1016/S0022-0000(02)00025-9.
  2. ^ Parberry, Ian; Schnitger, Georg (1988-06-01). "Parallel computation with threshold functions". Journal of Computer and System Sciences. 36 (3): 278–302. doi:10.1016/0022-0000(88)90030-X. ISSN 0022-0000.
  3. ^ Agrawal, Manindra; Allender, Eric; Datta, Samir (April 2000). "On TC0, AC0, and Arithmetic Circuits". Journal of Computer and System Sciences. 60 (2): 395–421. doi:10.1006/jcss.1999.1675.
  4. ^ a b Vollmer, Heribert (1998). Introduction to circuit complexity. A uniform approach. Texts in Theoretical Computer Science. Berlin: Springer-Verlag. p. 126. ISBN 3-540-64310-9. Zbl 0931.68055.
  5. ^ Naor, Moni; Reingold, Omer (March 2004). "Number-theoretic constructions of efficient pseudo-random functions". Journal of the ACM. 51 (2): 231–262. doi:10.1145/972639.972643. ISSN 0004-5411.
  6. ^ Hatami, Pooya; Hoza, William M.; Tal, Avishay; Tell, Roei (February 2022). "Fooling Constant-Depth Threshold Circuits (Extended Abstract)". 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS). IEEE. pp. 104–115. doi:10.1109/FOCS52979.2021.00019. ISBN 978-1-6654-2055-6.
  7. ^ Williams, Ryan (June 2011). "Non-uniform ACC Circuit Lower Bounds". 2011 IEEE 26th Annual Conference on Computational Complexity. pp. 115–125. doi:10.1109/CCC.2011.36. ISBN 978-1-4577-0179-5.
  8. ^ Allender, Eric; Koucký, Michal (March 2010). "Amplifying lower bounds by means of self-reducibility". Journal of the ACM. 57 (3): 1–36. doi:10.1145/1706591.1706594. ISSN 0004-5411.
  9. ^ Mix Barrington, David A.; Immerman, Neil; Straubing, Howard (1990-12-01). "On uniformity within NC1". Journal of Computer and System Sciences. 41 (3): 274–306. doi:10.1016/0022-0000(90)90022-D. ISSN 0022-0000.
  10. ^ Hesse, William (2001), Orejas, Fernando; Spirakis, Paul G.; van Leeuwen, Jan (eds.), "Division Is In Uniform TC0", Automata, Languages and Programming, Lecture Notes in Computer Science, vol. 2076, Berlin, Heidelberg: Springer Berlin Heidelberg, pp. 104–114, doi:10.1007/3-540-48224-5_9, ISBN 978-3-540-42287-7, retrieved 2025-03-19
  11. ^ Santhanam, Rahul; Williams, Ryan (2014-06-01). "On Uniformity and Circuit Lower Bounds". Computational Complexity. 23 (2): 177–205. doi:10.1007/s00037-014-0087-y. hdl:20.500.11820/d254202f-5539-45ba-ba25-cfe680aa46e9. ISSN 1420-8954.
  12. ^ Allender, Eric (1999). "The permanent requires large uniform threshold circuits". Chicago Journal of Theoretical Computer Science. 5 (1): 1–19. doi:10.4086/cjtcs.1999.007. ISSN 1073-0486.
  13. ^ Allender, E. (1996). "A note on uniform circuit lower bounds for the counting hierarchy". Proceedings 2nd International Computing and Combinatorics Conference (COCOON). Springer Lecture Notes in Computer Science. Vol. 1090. pp. 127–135. As cited in Burtschick, Hans-Jörg; Vollmer, Heribert (1998). "Lindström quantifiers and leaf language definability". International Journal of Foundations of Computer Science. 9 (3): 277–294. doi:10.1142/S0129054198000180. ECCC TR96-005.
  14. ^ Volkov, Sergey. (2016). "Finite Bases with Respect to the Superposition in Classes of Elementary Recursive Functions, dissertation". arXiv:1611.04843 [cs.CC].
  15. ^ a b Goldmann, Mikael; Håstad, Johan; Razborov, Alexander (1992-12-01). "Majority gates vs. general weighted threshold gates". Computational Complexity. 2 (4): 277–300. doi:10.1007/BF01200426. ISSN 1420-8954.
  16. ^ Goldmann, Mikael; Karpinski, Marek (February 1998). "Simulating Threshold Circuits by Majority Circuits". SIAM Journal on Computing. 27 (1): 230–246. doi:10.1137/S0097539794274519. ISSN 0097-5397.
  17. ^ a b c d Jukna, Stasys (2012). Boolean Function Complexity: Advances and Frontiers. Algorithms and Combinatorics. Berlin, Heidelberg: Springer Berlin Heidelberg. ISBN 978-3-642-24507-7.
  18. ^ Alon, Noga; Vũ, Văn H (1997-07-01). "Anti-Hadamard Matrices, Coin Weighing, Threshold Gates, and Indecomposable Hypergraphs". Journal of Combinatorial Theory, Series A. 79 (1): 133–160. doi:10.1006/jcta.1997.2780. ISSN 0097-3165.
  19. ^ a b Šíma, Jiří; Orponen, Pekka (2003-12-01). "General-Purpose Computation with Neural Networks: A Survey of Complexity Theoretic Results". Neural Computation. 15 (12): 2727–2778. doi:10.1162/089976603322518731. ISSN 0899-7667. PMID 14629867.
  20. ^ Maass, W.; Schnitger, G.; Sontag, E.D. (1991). "On the computational power of sigmoid versus Boolean threshold circuits". [1991] Proceedings 32nd Annual Symposium of Foundations of Computer Science. IEEE Comput. Soc. Press. pp. 767–776. doi:10.1109/SFCS.1991.185447. ISBN 978-0-8186-2445-2.
  21. ^ a b c d e f g Hajnal, András; Maass, Wolfgang; Pudlák, Pavel; Szegedy, Márió; Turán, György (April 1993). "Threshold circuits of bounded depth". Journal of Computer and System Sciences. 46 (2): 129–154. doi:10.1016/0022-0000(93)90001-D.
  22. ^ a b Parberry, Ian; Schnitger, Georg (1989-01-01). "Relating Boltzmann machines to conventional models of computation". Neural Networks. 2 (1): 59–67. doi:10.1016/0893-6080(89)90015-4. ISSN 0893-6080.
  23. ^ Ajtai, Miklos; Ben-Or, Michael (1984). "A theorem on probabilistic constant depth Computations". Proceedings of the sixteenth annual ACM symposium on Theory of computing - STOC '84. ACM Press. pp. 471–474. doi:10.1145/800057.808715. ISBN 978-0-89791-133-7.
  24. ^ Forster, Jürgen; Krause, Matthias; Lokam, Satyanarayana V.; Mubarakzjanov, Rustam; Schmitt, Niels; Simon, Hans Ulrich (2001), Hariharan, Ramesh; Vinay, V.; Mukund, Madhavan (eds.), "Relations Between Communication Complexity, Linear Arrangements, and Computational Complexity", FST TCS 2001: Foundations of Software Technology and Theoretical Computer Science, vol. 2245, Berlin, Heidelberg: Springer Berlin Heidelberg, pp. 171–182, doi:10.1007/3-540-45294-x_15, ISBN 978-3-540-43002-5, retrieved 2025-03-19
  25. ^ Håstad, Johan; Goldmann, Mikael (June 1991). "On the power of small-depth threshold circuits". Computational Complexity. 1 (2): 113–129. doi:10.1007/BF01272517. ISSN 1016-3328.
  26. ^ Allender, E. (October 1989). "A note on the power of threshold circuits". 30th Annual Symposium on Foundations of Computer Science. pp. 580–584. doi:10.1109/SFCS.1989.63538. ISBN 0-8186-1982-1.
  27. ^ Yao, Andrew Chi-Chih (1990). "On ACC and threshold circuits". 31st Annual Symposium on Foundations of Computer Science, St. Louis, Missouri, USA, October 22–24, 1990, Volume II. IEEE Computer Society. pp. 619–627. doi:10.1109/FSCS.1990.89583. ISBN 0-8186-2082-X.
  28. ^ Sherstov, Alexander A. (2009), "Separating AC0 from depth-2 majority circuits", SIAM Journal on Computing, 38 (6): 2113–2129, doi:10.1137/08071421X, MR 2491551

Further reading

edit
edit