Submitted:
01 July 2025
Posted:
02 July 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Theoretical Motivation
3. Model Structure
4. Experimental Setup and Results
-
import torchimport torch.nn as nnimport torch.nn.functional as Fimport torchvisionimport torchvision.transforms as transformsfrom torch.utils.data import Subset, DataLoaderfrom sklearn.metrics import accuracy_score, precision_score, recall_score, f1_scoreimport timeimport numpy as npimport random# Ensure reproducibilityseed = 42torch.manual_seed(seed)np.random.seed(seed)random.seed(seed)# ---------------------# 1. Dataset (CIFAR-10)# ---------------------transform = transforms.Compose([transforms.ToTensor(),transforms.Normalize((0.5,), (0.5,))])train_dataset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform)test_dataset = torchvision.datasets.CIFAR10(root='./data', train=False, download=True, transform=transform)
-
# Use only 5000 samples eachtrain_subset = Subset(train_dataset, range(5000))test_subset = Subset(test_dataset, range(5000))
-
train_loader = DataLoader(train_subset, batch_size=32, shuffle=True)test_loader = DataLoader(test_subset, batch_size=32, shuffle=False)
-
# -------------------------# 2. Standard MLP Model# -------------------------class MLP(nn.Module):def __init__(self):super(MLP, self).__init__()self.flatten = nn.Flatten()self.fc1 = nn.Linear(32 * 32 * 3, 512)self.fc2 = nn.Linear(512, 256)self.fc3 = nn.Linear(256, 10)
-
def forward(self, x):x = self.flatten(x)x = F.relu(self.fc1(x))x = F.relu(self.fc2(x))x = self.fc3(x)return x
-
# ---------------------------------------------------------# 3. Residual MLP with Debreu's Inspired Utility Connection# ---------------------------------------------------------class UtilityResidualMLP(nn.Module):def __init__(self):super(UtilityResidualMLP, self).__init__()self.flatten = nn.Flatten()self.fc1 = nn.Linear(32 * 32 * 3, 512)self.utility1 = nn.Sequential(nn.Linear(512, 512),nn.Sigmoid())self.fc2 = nn.Linear(512, 256)self.utility2 = nn.Sequential(nn.Linear(256, 256),nn.Sigmoid())self.fc3 = nn.Linear(256, 10)
-
def forward(self, x):x = self.flatten(x)out1 = F.relu(self.fc1(x))util1 = self.utility1(out1)res1 = out1 + util1
-
out2 = F.relu(self.fc2(res1))util2 = self.utility2(out2)res2 = out2 + util2
-
x = self.fc3(res2)return x
-
# ---------------------# 4. Training Function# ---------------------def train(model, loader, criterion, optimizer):model.train()for images, labels in loader:optimizer.zero_grad()outputs = model(images)loss = criterion(outputs, labels)loss.backward()optimizer.step()
-
# ---------------------# 5. Evaluation Function# ---------------------def evaluate(model, loader):model.eval()all_preds = []all_labels = []start_time = time.time()with torch.no_grad():for images, labels in loader:outputs = model(images)_, predicted = torch.max(outputs.data, 1)all_preds.extend(predicted.cpu().numpy())all_labels.extend(labels.cpu().numpy())end_time = time.time()return all_labels, all_preds, end_time - start_time
-
# ---------------------# 6. Metrics Function# ---------------------def calculate_metrics(true, pred):return {"accuracy": accuracy_score(true, pred),"precision": precision_score(true, pred, average='macro', zero_division=0),"recall": recall_score(true, pred, average='macro', zero_division=0),"f1": f1_score(true, pred, average='macro', zero_division=0)}
-
# ---------------------# 7. Run Experiment 10 Times per Model# ---------------------def run_experiments(model_class, model_name):all_results = {"accuracy": [],"precision": [],"recall": [],"f1": [],"time": []}print(f"\n==== Running 10 trials for {model_name} ====\n")for run in range(10):model = model_class()criterion = nn.CrossEntropyLoss()optimizer = torch.optim.Adam(model.parameters(), lr=0.001)
-
for epoch in range(5):train(model, train_loader, criterion, optimizer)
-
true_labels, predicted_labels, elapsed = evaluate(model, test_loader)metrics = calculate_metrics(true_labels, predicted_labels)
-
all_results["accuracy"].append(metrics["accuracy"])all_results["precision"].append(metrics["precision"])all_results["recall"].append(metrics["recall"])all_results["f1"].append(metrics["f1"])all_results["time"].append(elapsed)
-
print(f"Run {run + 1}: Acc={metrics['accuracy']:.4f}, Prec={metrics['precision']:.4f}, "f"Recall={metrics['recall']:.4f}, F1={metrics['f1']:.4f}, Time={elapsed:.2f}s")
-
print(f"\n---- {model_name} Summary ----")for key in all_results:values = all_results[key]mean = np.mean(values)std = np.std(values)print(f"{key.capitalize()} - Mean: {mean:.4f}, Std: {std:.4f}")print("\n")
-
# ---------------------# 8. Run Both Models# ---------------------run_experiments(MLP, "Standard MLP")run_experiments(UtilityResidualMLP, "Utility Residual MLP")The output of the experimental code is as follows:---- Standard MLP Summary ----Accuracy - Mean: 0.4197, Std: 0.0094Precision - Mean: 0.4258, Std: 0.0074Recall - Mean: 0.4198, Std: 0.0096F1 - Mean: 0.4097, Std: 0.0122Time - Mean: 1.9911, Std: 1.6200---- Utility Residual MLP Summary ----Accuracy - Mean: 0.4198, Std: 0.0068Precision - Mean: 0.4342, Std: 0.0041Recall - Mean: 0.4200, Std: 0.0068F1 - Mean: 0.4143, Std: 0.0089Time - Mean: 1.8464, Std: 0.7113
5. Versatility and Scalability
6. Conclusion
References
- Alaeddine, H., & Jihene, M. (2021). Deep residual network in network. Computational intelligence and neuroscience, 2021(1), 6659083.
- Fang, W., Yu, Z., Chen, Y., Huang, T., Masquelier, T., & Tian, Y. (2021). Deep residual learning in spiking neural networks. Advances in Neural Information Processing Systems, 34, 21056-21069.
- Quan, T. M. , Hildebrand, D. G. C., & Jeong, W. K. (2021). Fusionnet: A deep fully residual convolutional neural network for image segmentation in connectomics. Frontiers in Computer Science, 3, 613981.
- Chai, J. , Zeng, H., Li, A., & Ngai, E. W. (2021). Deep learning in computer vision: A critical review of emerging techniques and application scenarios. Machine Learning with Applications, 6, 100134.
- Shah, D. , Trivedi, V., Sheth, V., Shah, A., & Chauhan, U. (2022). ResTS: Residual deep interpretable architecture for plant disease detection. Information Processing in Agriculture, 9(2), 212-223.
- Sarwinda, D., Paradisa, R. H., Bustamam, A., & Anggia, P. (2021). Deep learning in image classification using residual network (ResNet) variants for detection of colorectal cancer. Procedia Computer Science, 179, 423-431.
- Ma, J. , Zhang, Z., Xu, K., & Qiao, Y. (2025). Improving the applicability of social media toxic comments prediction across diverse data platforms using residual self-attention-based LSTM combined with transfer learning.
- Lu, X. , & Firoozeh Abolhasani Zadeh, Y. A. (2022). Deep Learning-Based Classification for Melanoma Detection Using XceptionNet. Journal of Healthcare Engineering, 2022(1), 2196096.
- Xu, K. , Cai, Y., & Wilson, A. (2025). Inception Residual RNN-LSTM Hybrid Model for Predicting Pension Coverage Trends among Private-Sector Workers in the USA.
- Zuo, Q. , Chen, S., & Wang, Z. (2021). R2AU-Net: attention recurrent residual convolutional neural network for multimodal medical image segmentation. Security and Communication Networks, 2021(1), 6625688.
- Niu, G., Liu, E., Wang, X., Ziehl, P., & Zhang, B. (2022). Enhanced discriminate feature learning deep residual CNN for multitask bearing fault diagnosis with information fusion. IEEE Transactions on Industrial Informatics, 19(1), 762-770.
- Pandiyarajan, M. , & Valarmathi, R. S. (2024). VDRNet19: a dense residual deep learning model using stochastic gradient descent with momentum optimizer based on VGG-structure for classifying dementia. International Journal of Information Technology, 1-15.
- Liu, X., Ding, J., Jin, W., Xu, H., Ma, Y., Liu, Z., & Tang, J. (2021). Graph neural networks with adaptive residual. Advances in Neural Information Processing Systems, 34, 9720-9733.
- Adhinata, F. D. , Rakhmadani, D. P., Wibowo, M., & Jayadi, A. (2021). A deep learning using DenseNet201 to detect masked or non-masked face. JUITA: Jurnal Informatika, 9(1), 115-121.
- Mehri, A., Ardakani, P. B., & Sappa, A. D. (2021). MPRNet: Multi-path residual network for lightweight image super resolution. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (pp. 2704-2713).
- Kong, F., Li, M., Liu, S., Liu, D., He, J., Bai, Y., ... & Fu, L. (2022). Residual local feature network for efficient super-resolution. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition (pp. 766-776).
- Cao, Y. , Ding, Y., Jia, M., & Tian, R. (2021). A novel temporal convolutional network with residual self-attention mechanism for remaining useful life prediction of rolling bearings. Reliability Engineering & System Safety, 215, 107813.
- Mubashar, M. , Ali, H., Grönlund, C., & Azmat, S. (2022). R2U++: a multiscale recurrent residual U-Net with dense skip connections for medical image segmentation. Neural Computing and Applications, 34(20), 17723-17739.
- Lal, S. , Das, D., Alabhya, K., Kanfade, A., Kumar, A., & Kini, J. (2021). NucleiSegNet: Robust deep learning architecture for the nuclei segmentation of liver cancer histopathology images. Computers in Biology and Medicine, 128, 104075.
- Raza, R. , Bajwa, U. I., Mehmood, Y., Anwar, M. W., & Jamal, M. H. (2023). dResU-Net: 3D deep residual U-Net based brain tumor segmentation from multimodal MRI. Biomedical Signal Processing and Control, 79, 103861.
- Kokkalla, S. , Kakarla, J., Venkateswarlu, I. B., & Singh, M. (2021). Three-class brain tumor classification using deep dense inception residual network. Soft Computing, 25(13), 8721-8729.
- Shen, C. , Zhang, H., Meng, S., & Li, C. (2023). Augmented data driven self-attention deep learning method for imbalanced fault diagnosis of the HVAC chiller. Engineering Applications of Artificial Intelligence, 117, 105540.
- Kandel, J. , Tayara, H., & Chong, K. T. (2021). PUResNet: prediction of protein-ligand binding sites using deep residual neural network. Journal of cheminformatics, 13, 1-14.
- Ibrahim, M. R. , Benavente, R., Ponsa, D., & Lumbreras, F. (2024). SWViT-RRDB: Shifted window vision transformer integrating residual in residual dense block for remote sensing super-resolution. Proceedings Copyright, 575, 582.
- Sitaula, C. , & Shahi, T. B. (2022). Monkeypox virus detection using pre-trained deep learning-based approaches. Journal of Medical Systems, 46(11), 78.
- Yu, J., & Wu, B. (2021). Attention and hybrid loss guided deep learning for consecutively missing seismic data reconstruction. IEEE Transactions on Geoscience and Remote Sensing, 60, 1-8.
- Wang, Z. , Xie, B., Yang, S., Li, D., Wang, J., & Chan, S. (2025). A deep residual SConv1D-attention intrusion detection model for industrial Internet of Things. Cluster Computing, 28(2), 116.
- Abdollahi, A. , Pradhan, B., & Alamri, A. (2022). SC-RoadDeepNet: A new shape and connectivity-preserving road extraction deep learning-based network from remote sensing data. IEEE Transactions on Geoscience and Remote Sensing, 60, 1-15.
- Almusallam, N. , Ali, F., Kumar, H., Alkhalifah, T., Alturise, F., & Almuhaimeed, A. (2024). Multi-headed ensemble residual CNN: a powerful tool for fibroblast growth factor prediction. Results in Engineering, 24, 103348.
- Song, Q. , Wang, M., Lai, W., & Zhao, S. (2022). On Bayesian optimization-based residual CNN for estimation of inter-turn short circuit fault in PMSM. IEEE Transactions on Power Electronics, 38(2), 2456-2468.
- Abdar, M. , Fahami, M. A., Chakrabarti, S., Khosravi, A., Pławiak, P., Acharya, U. R.,... & Nahavandi, S. (2021). BARF: A new direct and cross-based binary residual feature fusion with uncertainty-aware module for medical image classification. Information Sciences, 577, 353-378.
- Nakada, S. (2024). Shapley meets debreu: A decision-theoretic foundation for monotonic solutions of tu-games. Available at SSRN.
- Gourdel, P. , Le Van, C., Pham, N. S., & Viet, C. T. (2025). Hartman-Stampacchia theorem, Gale-Nikaido-Debreu lemma, and Brouwer and Kakutani fixed-point theorems.
- Khan, M. A. , McLean, R. P., & Uyanik, M. (2025). Excess demand approach with non-convexity and discontinuity: a generalization of the Gale–Nikaido–Kuhn–Debreu lemma. Economic Theory, 1-24.
- Le, T. , Le Van, C., Pham, N. S., & Saglam, C. (2022). A direct proof of the Gale–Nikaido–Debreu lemma using Sperner’s lemma. Journal of Optimization Theory and Applications, 194(3), 1072-1080.
- Vilks, A. (2022). On an “Important Principle” of Arrow and Debreu. The BE Journal of Theoretical Economics, 22(2), 621-627.
- Le, T. , Le Van, C., Pham, N. S., & Saglam, C. (2021). Direct Proofs of the Existence of Equilibrium, the Gale-Nikaido-Debreu Lemma and the Fixed Point Theorems using Sperner's Lemma.
- Anderson, R. M. , & Duanmu, H. (2025). Cap-and-Trade and Carbon Tax Meet Arrow–Debreu. Econometrica, 93(2), 357-393.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).