Training an Artificial Neural Network

Collaborative Discussion

Initial Post: Legal and Ethical Views on ANN Applications

The field of Large Language Models (LLMs) is advancing rapidly, with processing power growing significantly every six months (Sevilla et al. 2022). The groundbreaking introduction of transformers enabled more efficient training, laying the foundation for models like BERT and GPT-3, alongside many contemporary applications like “robo-writers” (Hutson 2021).

However revolutionary, concerns existed regarding biases. GPT-3 demonstrated tendencies toward radicalisation, sexism and racism (Hutson 2021), issues that are still being observed in GPT-4. A recent article found the latter model to be misattributing respiratory symptoms to anxiety disorders in female patients and further stigmatising STIs, especially among marginalised groups (Zack et al. 2024). While the study noted no broad diagnostic biases across demographics, it highlighted that careful training could potentially eliminate such flaws, making LLMs valuable for writing case reports and facilitating diagnosis.

Academic applications present both benefits and risks. LLMs can aid non-native speakers and early-career researchers with producing refined texts, but over-reliance can turn into dishonest behaviours, threatening academic integrity and critical thinking development (Perkins et al. 2023). This raises ethical questions regarding proper regulation. Similar issues also emerge in business contexts. AI email writing assistants produce clean, professional text, but they lack personalisation even though they can accurately mirror human empathy and structure (Li et al. 2025). Data privacy remains a universal concern, as sensitive information input into LLMs may lead to unwanted exposure and data retrieval may prove to be a laborious task.

Current literature emphasises the need for regulated implementation, balancing the use of AI with human input (Li et al. 2025; Tang et al. 2024; Zack et al. 2024). With this approach, we could maintain creativity in writing, prevent false accusations of academic misconduct, and maintain individualised communication in professional settings. Proper implementation should consider these points while also addressing bias and data privacy to keep utilising LLMs' full potential.

References
  • Hutson, M. (2021) ‘Robo-writers: the rise and risks of language-generating AI’, Nature 591(7848), pp. 22–25. Available at: https://www.nature.com/articles/d41586-021-00530-0 (Accessed: 22 June 2025).
  • Li, W., Lai, Y., Soni, S. and Saha, K. (2025) ‘Emails by LLMs: a comparison of language in AI-generated and human-written emails’, Proceedings of the 17th ACM Web Science Conference, pp. 391–403. Available at: https://dl.acm.org/doi/10.1145/3717867.3717872 (Accessed: 23 June 2025).
  • Perkins, M., Roe, J., Postma, D. and McGaughran, J. (2023) ‘Detection of GPT-4 Generated Text in Higher Education: Combining Academic Judgement and Software to Identify Generative AI Tool Misuse’, Journal of Academic Ethics 22(22). Available at: 10.1007/s10805-023-09492-6 (Accessed: 23 June 2025).
  • Sevilla, J., Heim, L., Ho, A., Besiroglu, T., Hobbhahn, M. and Villalobos, P. (2022) ‘Compute Trends Across Three Eras of Machine Learning’, 2022 International Joint Conference on Neural Networks (IJCNN). Available at: 10.48550/arXiv.2202.05924 (Accessed: 23 June 2025).
  • Tang, X., Chen, H., Lin, D. and Li, K. (2024) ‘Harnessing LLMs for multi-dimensional writing assessment: Reliability and alignment with human judgments’, Heliyon 10(14), p. e34262. Available at: https://doi.org/10.1016/j.heliyon.2024.e34262 (Accessed: 23 June 2025).
  • Zack, T., Lehman, E., Suzgun, M., Rodriguez, J., A., Celi, L., A., Gichoya, J., Jurafsky, D., Szolovits, P., Bates, D., W., Abdulnour, R., Butte, A., J. and Alsentzer, E. (2024) ‘Assessing GPT-4's potential to perpetuate biases in healthcare: a model evaluation study’, The Lancet Digital Health 6(1), pp. e12–e22. Available at: https://www.thelancet.com/journals/landig/article/PIIS2589-7500(23)00225-X/fulltext (Accessed: 23 June 2025).

Summary Post: Legal and Ethical Views on ANN Applications

As mentioned in my initial post, Large Language Models (LLMs) have rapidly transformed how we approach various aspects of life, including communication, writing, research, and decision-making. Recent progress has been powered by transformer architectures, rapidly emerging as leaders over previous deep learning approaches like Convolutional Neural Networks (CNNs) (Sajun, Sankalpa and Zualkernan, 2024). Examples include LLMs like BERT and GPT-4, models that pushed the boundaries of Natural Language Processing (NLP).

GPT-4 is a powerful tool, passing both the Turing test (Jones and Bergen, 2025) and the BAR exam (Daniel Martin Katz et al., 2024) with great performance. However, uncertainty remains a major concern. Despite their strengths, LLMs often generate false or nonsensical information, a process called hallucination (Liu et al., 2024). To address this, Zhang et al. (2025) applied a retrieval-augmented generation (RAG) method, feeding the model with real examples to fill in the gaps and prevent it from falsifying code or generating confusion.

Another issue raised in the initial post, and by my peers, is bias. LLMs were found to reflect societal biases, propagating issues like gender and racial stereotypes (Zack et al. 2024). This aspect, fueled by widespread use, highlights the urgent need for more accountability and regulation in model training and retroactive error correction.

Regardless of NLP's success, limitations persist. Trying to replicate traits such as empathy and common sense remains difficult, although improvements are underway (Rasool et al., 2025). Ethical challenges also remain: overreliance in writing may undermine learning and academic integrity (Perkins et al. 2023), while applications in business raise questions about data privacy (Li et al. 2025).

Moving forward, the AI implementation process must be responsible, including tracing a solid legal framework, but the most important aspect to ensure smooth progression is combining human oversight with machine support. It is essential to mitigate risks to harness AI's full potential across not only text, but only vision and other applications.

References
  • Jones, C.R. and Bergen, B.K. (2025) ‘Large Language Models Pass the Turing Test’, arXiv (Cornell University). Available at: https://arxiv.org/abs/2503.23674 (Accessed: 7 July 2025).
  • Katz, D.M., Bommarito, M.J., Gao, S. and Arredondo, P. (2024) ‘GPT-4 passes the bar exam’, Philosophical Transactions of the Royal Society A 382(2270). Available at: https://doi.org/10.1098/rsta.2023.0254 (Accessed: 8 July 2025).
  • Li, W., Lai, Y., Soni, S. and Saha, K. (2025) ‘Emails by LLMs: A Comparison of Language in AI-Generated and Human-Written Emails’, Proceedings of the 17th ACM Web Science Conference, pp. 391–403. Available at: https://dl.acm.org/doi/10.1145/3717867.3717872 (Accessed: 8 July 2025).
  • Liu, F., Liu, Y., Shi, L., Huang, H., Wang, R., Yang, Z., Zhang, L., Li, Z. and Ma, Y. (2024) ‘Exploring and Evaluating Hallucinations in LLM-Powered Code Generation’, arXiv (Cornell University). Available at: https://doi.org/10.48550/arXiv.2404.00971 (Accessed: 8 July 2025).
  • Perkins, M., Roe, J., Postma, D. and McGaughran, J. (2023) ‘Detection of GPT-4 Generated Text in Higher Education: Combining Academic Judgement and Software to Identify Generative AI Tool Misuse’, Journal of Academic Ethics 22(22). Available at: https://doi.org/10.1007/s10805-023-09492-6 (Accessed: 8 July 2025).
  • Rasool, A., Shahzad, M.I., Aslam, H., Chan, V. and Arshad, M.A. (2025). ‘Emotion-Aware Embedding Fusion in Large Language Models (Flan-T5, Llama 2, DeepSeek-R1, and ChatGPT 4) for Intelligent Response Generation’, AI 6(3), p.56. Available at: https://doi.org/10.3390/ai6030056 (Accessed: 8 July 2025).
  • Sajun, A.R., Sankalpa, D. and Zualkernan, I. (2024) ‘A Historical Survey of Advances in Transformer Architectures’, Applied Sciences 14(10), pp.4316–4316. Available at: https://doi.org/10.3390/app14104316 (Accessed: 8 July 2025).
  • Zack, T., Lehman, E., Suzgun, M., Rodriguez, J., A., Celi, L., A., Gichoya, J., Jurafsky, D., Szolovits, P., Bates, D., W., Abdulnour, R., Butte, A., J. and Alsentzer, E. (2024) ‘Assessing GPT-4's potential to perpetuate biases in healthcare: a model evaluation study’, The Lancet Digital Health 6(1), pp. e12–e22. Available at: https://www.thelancet.com/journals/landig/article/PIIS2589-7500(23)00225-X/fulltext (Accessed: 8 July 2025).
  • Zhang, Z., Wang, C., Wang, Y., Shi, E., Ma, Y., Zhong, W., Chen, J., Mao, M. and Zheng, Z. (2025) ‘LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigation’, Proceedings of the ACM on software engineering 2(ISSTA), pp.481–503. Available at: https://doi.org/10.1145/3728894 (Accessed: 8 July 2025).

Formative Activity

Gradient Cost Function

Additionally, after reading an article on the foundations of the Neural Networks (NNs), I had to run a gradient cost function code with different values for iterations and learning rate, with the purpose of observing how the cost is affected.

According to the article mentioned, NNs learn by adjusting their weights to make better predictions. A few notions are key to this process. Gradient descent improves weights step-by-step by measuring the error and adjusting weights to reduce it. Backpropagation has a pretty self-explanatory name: it works backwards through the code to determine how each weight affects the error. The overall conclusion is that adjusting the step size, which is what we call the learning rate, and updating weights after each iteration helps the learning process and helps with avoiding plateaus.

The initial values for the iteration and learning rate were the following:

            
              iterations = 100
              learning_rate = 0.08
            
          

The final cost value was 0.004121.

By changing to a bigger iteration value of 120, the cost decreased to 0.001376. This makes sense, since the model has more time to adjust weight and reduce errors. Changing the step size to a smaller value of 0.07 had a bigger cost value of 0.0081894. This means that a smaller learning rate, meaning a slower and smaller step, makes the model worse at learning from its errors. All of the tests I ran seem to be in tune with the article on Neural Networks foundations.