Introduction
Modern Large Language Models (LLMs) are computationally expensive and energy-intensive, largely due to their reliance on massive floating-point matrix multiplications. Deep Differentiable Logic Gate Networks (DDLGNs) emerged as a "green" alternative, replacing these operations with sparse, low-cost logic gates (like AND, OR, XOR). However, until now, DDLGNs were limited to feed-forward and convolutional architectures. This paper introduces Recurrent Deep Differentiable Logic Gate Networks (RDDLGN), bridging the gap by introducing recurrence into the logic-gate framework, allowing the model to maintain state and process sequential information.
Methodology: Differentiable Logic in Sequence Modeling
The authors extend the DDLGN framework into an encoder-decoder architecture. To make logic gates "learnable," each "neuron" in a LogicLayer is treated as a soft mixture of all 16 possible two-input Boolean gates. During training, the model learns "logits" that determine which gate is most appropriate. Since discrete logic gates are not differentiable, smooth surrogate functions (e.g., AND relaxed to $x_1 \cdot x_2$) allow for gradient-based learning via backpropagation.
The architecture uses specific layer groups:
- K-layers (Encoder) & P-layers (Decoder): Handle temporal encoding by propagating hidden states across timesteps.
- N, L, and M layers: Manage representation learning and output generation.
A key feature is the "collapse" phase: after training, the soft mixtures are replaced by the single most probable gate, and continuous inputs are binarized. This results in a pure Boolean circuit capable of running natively on ultra-efficient hardware like FPGAs.
Key Insights and Results
The model was evaluated on the WMT’14 English-German Translation benchmark and a custom "Shifted Monolingual Prediction" task.
Performance Comparison
On WMT’14, the uncollapsed RDDLGN achieved a BLEU score of 5.00 and 30.9% accuracy, outperforming the vanilla RNN baseline (4.59 BLEU) and approaching GRU performance (5.41 BLEU). Even when "collapsed" for inference, the model maintained a respectable 4.39 BLEU.
Scaling and Robustness
The authors observed a log-linear relationship between "node count" (the number of logic gates) and training accuracy, suggesting that logic-gate networks benefit from scaling similar to traditional neural networks. Furthermore, RDDLGNs demonstrated superior memorization in "shift factor" tests, maintaining high accuracy where standard RNNs failed, indicating more robust state retention.
Limitations and Future Outlook
While promising, RDDLGNs currently require higher-dimensional embeddings (1024 vs. 256) to compensate for lower information density per bit in binary logic. Training times are also currently longer than conventional architectures. Future work aims to explore associative recurrent blocks to improve training efficiency and to implement these models directly on FPGAs to realize theoretical energy savings.
Summary updated